Fetch more than 100 messages

What you can do is use an async/await function and a loop to make sequntial requests async function lots_of_messages_getter(channel, limit = 500) { const sum_messages = []; let last_id; while (true) { const options = { limit: 100 }; if (last_id) { options.before = last_id; } const messages = await channel.fetchMessages(options); sum_messages.push(…messages.array()); last_id = messages.last().id; … Read more

Deleting User Messages in Discord.py

Yup, it should be possible. You need the bot/user account to have the Manage Messages permission. @client.event async def on_message(message): await message.delete() So, the event would occur something like User sends message Bot detects that the user has sent a message Bot deletes the message that the user sent Hopefully from this you should be … Read more

Having trouble sending a message to a channel with Discord.js [duplicate]

You need to enable the GUILD_MESSAGES intent: const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] }); This will enable you to receive the MESSAGE_CREATE event for messages sent in guilds. A full list of intents can be found on the Discord developer docs. Additionally, if you are using Discord.js v13, the message event has been … Read more

Discord Music bot VoiceClient’ object has no attribute ‘create_ytdl_player’

create_ytdl_player was the old way of creating a player. With discord.py@rewrite (> v.1.0), playing music is a bit more complicated. There are two ways to play music. For both ways, using FFmpeg will be necessary, so you’ll have to install it. Here are two of ways to play videos (with youtube-dl and ffmpeg): From file … Read more