Questions tagged [dm]

103 questions
0
votes
1 answer

DMing a Specific Person with Pinging Him

so today I was trying to make a bot DM a specific person by pinging him, for example: !dm @potato hello By Using This: if (message.content.startsWith(prefix + 'dm')) { let args = message.content.split(" ")[2]; let user =…
Issemoran
  • 1
  • 1
0
votes
1 answer

discord.py - Error command with DM member

I wanted to make an error command for my code, that gets shown when the dms are turned off or the user wasn't found, here's my code: @client.command() async def DM(ctx, user: discord.User, *, message=None): message = message or "DM message…
Takaso
  • 39
  • 6
0
votes
1 answer

How to use the awaitMessages function in discord.js

I have some code for discord.js that sends a user a DM when they join the server. They then have to enter the password given to them, and it will then give them a role that allows them access to channels. const Discord = require('discord.js'); const…
Rpergy
  • 21
  • 1
  • 6
0
votes
2 answers

How do you make a Discord bot respond to commands in DMs? (Python)

I've just started writing Discord bots. I'm currently working on a bot that helps with Dungeons & Dragons games (dice rolling and initiative tracking are working at the moment). I've gotten my bot to send private rolls to a DM with the user that…
Dana Harris
  • 1
  • 1
  • 3
0
votes
1 answer

How to make welcome message for new members of the discord server on discord.js?

I know this is such a basic question, but 1. I'm new to programing in discord.js (I programmed before in HTML but this is different) 2. I'm very young (I'm a kido LOL) Ok, so my question is: how do I make a function at my bot that sends a welcome…
user13329014
0
votes
2 answers

Discord.js User DM from id

Im trying to dm a user but I only have there id. This is the code im using: const member = bot.users.cache.find(ID) member.send('TEXT') it isn't working. Does anyone know why?
Toadless
  • 43
  • 5
0
votes
0 answers

discord.net send DM, create channel, unknown channel

I use my bot to help my users register themselves for events. They -register UserId to register, and they get a DM reply with typical reaction driven menus to set parameters and provide information. Unfortunately, whenever the connection is…
weow
  • 1
0
votes
3 answers

How to send a DM to new members of a discord server using a discord bot (python 3)

I have tried using a few ways all of which did not cause any error messages (or if they did they were easy to fix) but they still did not send the DM. the way that I'm most confident of is: @client.event async def on_member_join(member): await…
0
votes
1 answer

Python DM all command

So, I was making a custom bot for my server and had a problem, heres my code: @bot.command() @commands.has_role('| Owner') async def dmall(ctx,desc): title = f'message from {ctx.message.author}' await ctx.send('Sending messages!') for…
MysteriousK
  • 89
  • 1
  • 3
  • 9
0
votes
2 answers

DM Everyone Command

I don't get why I have an error in this code: @client.command() async def dmall(ctx, message): for m in client.get_all_members(): await m.send(message) await ctx.send("Done!") My DMs are on, but here is the error: I have also tried…
Wha-
  • 204
  • 3
  • 16
0
votes
3 answers

Raise forbidden exception when trying to dm a banned user (Discord.py)

When i run this code, it raises a 403 Forbidden exception : Cannot send messages to this user. How can i bypass that and so dm banned & kicked users ? if user.dm_channel == None: await user.create_dm() await user.dm_channel.send( …
Wafelack
  • 13
  • 1
  • 3
0
votes
0 answers

Improving upon discord MassDM bot

import discord from discord.ext import commands import platform import random import time bot = commands.Bot(command_prefix='+', case_insensitive=True) @bot.event async def on_ready(): print(f'Logged in as {bot.user.name}(ID: +{bot.user.id}) |' …
0
votes
1 answer

How can I select a certain user with an ID to DM? Discord.js 1.46

This is what I tried: if (!message.member.username.cache.find) === "Duck")) return message.channel.send('You dont have permissions to use this command.') Basically it got a lot of errors.
Montz
  • 1
0
votes
1 answer

Discord Bot should react to his own dm that he sent

So I want to ask what I have to write so that my bot reacts to his own dm that he sent const Discord = require('discord.js'); const { prefix, token } = require('./config.json'); const client = new Discord.Client(); client.on('ready', () => { …
Nico105
  • 188
  • 1
  • 12
0
votes
2 answers

Discord Bot Mention a user in dm

So i want that the bot @ the user he is talking to because ${member} (i saw that on youtube) doesnt work and so i want to ask what i have to write so that he writes "Hello @(the users name)..." remember please he is writing that as a dm. const…
Nico105
  • 188
  • 1
  • 12