ChannelCreateCommand
Triggers when a channel is created in a guild. Placeholders can be used to retrieve data from the created channel.

Placeholders: 11

  1. 1.
    {id} - channel id
  2. 2.
    {name} - channel name
  3. 3.
    {mention} - channel mention
  4. 4.
    {type} - channel type
  5. 5.
    {parentposition} - position in category
  6. 6.
    {rawposition} - position in channel list
  7. 7.
    {parentid} - category id of the channel
  8. 8.
    {parentname} - category name of the channel
  9. 9.
    {guildid} - guild id of where the channel is created
  10. 10.
    {guildname} - guild name of where the channel is created
  11. 11.
    {created} - date of the creation of the channel

Example 1: The event placed in the main file.

1
bot.ChannelCreateCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
{name} channel in {guildname} was just created!
5
`
6
})
7
bot.onChannelCreate()
Copied!

Example 2: The event placed in the event handler (its own file)

bot.onChannelCreate() - Goes in the main file to be able to call the event!
1
module.exports.ChannelCreateCommand = ({
2
name: "$getServerVar[channel]",
3
code: `
4
{name} channel in {guildname} was just created!
5
`
6
})
Copied!
Last modified 5mo ago
Copy link