[Solved] Discord.NET How can I give every person a role by one command?

You can do it using the code below. There are various ways of improving the command’s functionality so perhaps think about that. [Command(“addrole all”), Summary(“Adds the Star role to all users”)] public async Task AddRoleStarCommand() { // Gets all the users of the guild. Note that this may not completely // work for extremely large … Read more

[Solved] how do i send a private message to all people who have a certain role? (discord.js) [closed]

You can use the Role.members property. // get role by name const role = message.guild.roles.cache.find(role => role.name === ‘<roleName>’); // send a message to everyone with the role role.members.each(user => user.send(‘This is a DM’)); This method assumes you have a way to get the <roleName> value from a string; perhaps with an args variable. solved … Read more

[Solved] how do i send two messages in one? [closed]

You Could Use \n To Make a New Line or You Can Use this code to make the text a link const embed = new Discord.MessageEmbed() embed.setTitle(“BOT INVITE LINK”) embed.setColor(“BLACK”) embed.setURL(“INVITE LINK”) embed.setDescription(“**Click On The Blue Title Above to Invite BOT to Your Server :D**”) message.channel.send(embed) solved how do i send two messages in one? … Read more

[Solved] I am tring to make a discord bot that wait for the user message and if three tags are mentioned it give tick reaction

You can use the on_message event to catch every message and do what you like with it. This is better than waiting for a message and executing code as this is faster. The downside is the channel must be hard-coded or use a global variable. Or, you could recreate the whole command in the function … Read more

[Solved] Discord js bot message

I recommend attempting to google the answer to your question for at least 30 minutes prior to posting on a website such as this, as such queries will usually return useful information. Either way, to create a line-break, you can use \n Integrating this into usable code, you can do, for example: message.channel.send(‘Line one \n … Read more

[Solved] “Expected an indented block” error while coding python for discord bot [closed]

Looks like it’s this section: async def raid(ctx): while True: await ctx.send(“””@Raider come show some support and join the raid! Meet: (link1) Target: (link2) Raid Call: “””) await asyncio.sleep(5) Just needs to be indented properly: async def raid(ctx): while True: await ctx.send(“””@Raider come show some support and join the raid! Meet: (link1) Target: (link2) Raid … Read more

[Solved] Problem with can only concatenate str (not “NoneType”) to str

The problem is, sizes doesn’t return anything. print does not return values, it just prints. You’d need to do something like: acc = “” for span in Size: acc += span.text.replace(‘EU:’,”).strip() # Concatenate the strings together return acc There are also more efficient ways of doing this using a list comprehension/generator expression and join: return … Read more