Answers for "how to delete all message in a discord channel"

0

discord bot remove message

import discord.ext

bot = commands.Bot(";")

@bot.event 
async def on_message(message):
    if message.content.upper().startswith(";SAY"):
        args = message.content.split(" ")
        await bot.send_message(message.channel, "%s" % (" ".join(args[1:])))
        await bot.delete_message(message)
Posted by: Guest on January-24-2021
0

discord bot create remove text channel

You can delete a channel with Channel.delete(). If you'd like to delete the channel a command was sent in, you can do something like this:

message.channel.delete.catch(console.error);
To delete all channels, you can use Collection.each()

// iterate a function through all channels in a guild
message.guild.channels.cache.each((channel) =>
  channel.delete().catch(console.error));
Posted by: Guest on August-15-2021

Code answers related to "how to delete all message in a discord channel"

Code answers related to "Assembly"

Browse Popular Code Answers by Language