Questions tagged [discord]

For use with the Discord API, which provides an interface that allows you to program bots for Discord messaging services.

Discord is a web-app chat designed mostly for gamers. It also comes with API packages, allowing programmers to make bots.

The Discord API interfaces with Discord, a gamer-orientated messaging service.

The list of Discord API packages and languages it supports are listed here

12460 questions
53
votes
5 answers

Discord.py error: TypeError: __new__() got an unexpected keyword argument 'deny_new'

Yesterday, my code was perfectly fine. Everything was running... and it was going great. All of a sudden, this error: TypeError: __new__() got an unexpected keyword argument 'deny_new' pops up in my PyCharm console. I've looked it up on the…
Daniel Tam
  • 805
  • 1
  • 5
  • 16
46
votes
3 answers

Python [Invalid syntax] with async def

I am trying write discord bots using Python, I have come across and threw together this bot. import discord import asyncio import random client = discord.Client() inEmail = input("Email:") inPassword = input("Passwd:") async def…
Viewerisland
  • 687
  • 1
  • 5
  • 11
29
votes
7 answers

Send a message with Discord.js

I am trying to make a discord bot, but I can't quite understand Discord.js. My code looks like this: client.on('message', function(message) { if (message.content === 'ping') { client.message.send(author, 'pong'); } }); And the problem is that I…
Gabe
  • 434
  • 1
  • 5
  • 11
29
votes
3 answers

How to join a server?

I'm trying to setup a discord bot with python. I have a pre-existing discord server that I would like the bot to join, but I'm having a hard time doing so. import discord import asyncio import…
Laxsnor
  • 727
  • 1
  • 8
  • 20
20
votes
1 answer

None of my discord.js guildmember events are emitting, my user caches are basically empty, and my functions are timing out?

My code has been working just fine for weeks, but a few events and functions have randomly stopped working! Firstly, my guildMemberAdd, guildMemberRemove, and guildMemberUpdate events simply stopped doing anything. No errors are appearing, and when…
Lioness100
  • 7,179
  • 5
  • 9
  • 43
20
votes
2 answers

create_task = asyncio.async: SyntaxError: invalid syntax

I'm creating a bot for Discord, and I just wrote this simple code: import discord TOKEN = "token" client = discord.Client() @client.event async def on_ready(): print('Bot is ready.') client.run(TOKEN) and it produces the following…
O Tal Antiquado
  • 241
  • 1
  • 2
  • 8
18
votes
7 answers

Bash: Python3: command not found (Windows, discord.py)

I've been trying to configure the discord API discord.py and for the purpose of running the Red-MusicBot on my server. I've installed Python 3.5, and added the PATH variables (I clicked the "add Python to PATH" option in install). Here's what my…
Yakman3
  • 203
  • 1
  • 2
  • 6
16
votes
2 answers

New Discord Slash Commands

Recently, discord added support for slash commands for your own application. I read through the documentation for it, and I've tried to search for some videos (however the feature did JUST come out) but I do not understand what I actually have to do…
Shreyas007
  • 349
  • 1
  • 1
  • 10
16
votes
4 answers

How can I send an embed via my Discord bot, w/python?

I've been working a new Discord bot. I've learnt a few stuff,and, now, I'd like to make the things a little more custom. I've been trying to make the bot send embeds, instead, of a common message. embed=discord.Embed(title="Tile",…
Norberto A.
  • 258
  • 2
  • 8
  • 22
16
votes
1 answer

How to check if a message has a combined character in it?

. . . Example: กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ ก็็็็็็็็็็็็็็็็็็็็ ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ ก็็็็็็็็็็็็็็็็็็็็ กิิิิิิิิิิิิิิิิิิิิ ก้้้้้้้้้้้้้้้้้้้้ กิิิิิิิิิิิิิิิิิิิิ…
Miss Cartoon
  • 203
  • 1
  • 8
16
votes
6 answers

How to Play Audio File Into Channel?

How do you play an audio file from a Discord bot? Needs to play a local file, be in JS, and upon a certain message being sent it will join the user who typed the message, and will play the file to that channel.
Nicholas Johnson
  • 822
  • 1
  • 11
  • 33
14
votes
1 answer

Meta tags for URL with description and image (In Skype, Discord)

When someone sends a link in Skype or Discord, it can show an image and description, for example: I think it's because of tags in the HTML element. But HTML supports hundreds of tags... I found this page on GitHub, Link:…
Oliver
  • 110
  • 1
  • 3
  • 19
13
votes
3 answers

Permission System for Discord.py Bot

I am in the process of making a discord bot using discord.py and asyncio. The bot has commands like kick and ban which obviously should not be available to normal users. I want to make a simple system which will detect what permissions the user's…
user9123
  • 507
  • 1
  • 6
  • 17
12
votes
1 answer

Why does on_message stop commands from working?

Basically, everything appears to work fine and start up, but for some reason I can't call any of the commands. I've been looking around for easily an hour now and looking at examples/watching videos and I can't for the life of me figure out what is…
Acemcbean
  • 157
  • 1
  • 1
  • 5
12
votes
4 answers

Discord Bot Can't Get Channel by Name

I have been making a discord bot and wanted to make it send a message to a specific "Welcome" channel. Unfortunately, I have been unable to do so. I tried this. const welcomeChannel = bot.channels.get("name",…
Leo
  • 237
  • 1
  • 2
  • 8
1
2 3
99 100