Skip to content

Support forum threads #7

Description

@Jay2k1

According to the docs, in order to create a forum thread, you only have to supply an additional thread_name field in the JSON (and use a forum channel webhook URL).

I have tried it by just adding a getter and a setter for it in webhook.inc like so:

	public bool GetThreadName(char[] buffer, int maxlength) {
		return this.GetDataString("thread_name", buffer, maxlength);
	}
	
	public void SetThreadName(char[] threadName) {
		this.UpdateDataObject("thread_name", json_string(threadName));
	}

This worked fine to create a thread. I have not tried using the new code on a regular channel webhook though.

BTW, I found out that the thread_name has a maximum length of 100 characters. If you supply a longer title, it gets truncated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions