Тёмный

Discord Python - How to Create General & Admin Commands 

Michael Kitas
Подписаться 8 тыс.
Просмотров 2,5 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@sky_city
@sky_city Год назад
this tutorial no longer works. now, you have to put the intents and the prefixes after "client = MyClient()"
@MichaelKitas
@MichaelKitas Год назад
Thanks for the comment, I will pin it so other people notice this update
@timmyt1232
@timmyt1232 4 месяца назад
with: message.author.roles I get error: 'User' object has no attribute 'roles' Member has roles, but User doesn't?
@alexandratravels
@alexandratravels 2 года назад
ty for this tutorial
@khalilebdelli6199
@khalilebdelli6199 Год назад
for some reason im facing issues with having my bot read the messages in my server and replying to them , i even gave it the admin role, still it doesn't reply to me , yet when i run the same command in a DM it works , please let me know if theres a work around
@MichaelKitas
@MichaelKitas 11 месяцев назад
It sounds like your bot might be encountering issues specific to server text channels. Here are a few things to check: 1. Intents: Make sure you've enabled the necessary gateway intents in both your Discord developer portal and your bot's code. For reading messages, you'll need the 'Message Content Intent' and 'Guild Messages Intent'. 2. Permissions: Even with the admin role, double-check the channel-specific permissions to ensure the bot has access to read messages and send messages in the particular channel you're testing. 3. Code Logic: Verify that your code doesn't have any conditions that prevent it from responding in server channels (like checks for DMs). 4. Event Handling: Ensure you're using the right event listener for messages (`on_message` or a command decorator like `@bot.command()`). 5. Error Logging: Implement error logging to catch and understand any issues that occur when the bot fails to respond in the server. Remember to restart your bot after making changes to its code or permissions. Hope this helps you troubleshoot the issue!
@MichaelKitas
@MichaelKitas 2 года назад
Don't forget to join our discord server: discord.gg/mYCBHTZm6v Let's chat and help each other out in programming related topics!
@ArtByAhri
@ArtByAhri 2 года назад
This was really helpful, you're amazing ♡ I was trying the old method to add commands but iirc discord removed prefix commands for python. I would like to do this method in cogs. I'm not sure how to do that yet.
Далее
Discord Python - Restricting Channels/Users
7:41
Просмотров 1,6 тыс.
The most important Python script I ever wrote
19:58
Просмотров 199 тыс.
Barno
00:22
Просмотров 435 тыс.
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Google Data Center 360° Tour
8:29
Просмотров 5 млн
This is How I Scrape 99% of Sites
18:27
Просмотров 76 тыс.
Discord Bot with Python - Tutorial 4 - Roles Bot
27:05
Tmux has forever changed the way I write code.
13:30
Просмотров 996 тыс.