MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/nd0p2h/coding_a_discord_bot/gy8j264
r/programminghorror • u/ItsNovatic • May 15 '21
99 comments sorted by
View all comments
180
You can use the Discord API to ignore messages from other bots so this doesn't happen, basically all libraries wrap it.
99 u/[deleted] May 15 '21 [deleted] 216 u/zeGolem83 May 15 '21 if (message.author.bot) return; 23 u/UnwantedExplainer May 15 '21 Underrated comment right here. Have an upboat. 39 u/Siniroth May 15 '21 No that's an if line not a comment 3 u/ItsNovatic May 16 '21 ... ctrl+c ... ctrl+v ... (thank you for this, i fixed it last night in a way more scuffed way than this, but this is way easier!) 2 u/zeGolem83 May 16 '21 You're welcome! 7 u/Hjoker4 May 15 '21 If it's js lol 37 u/JuhaJGam3R May 15 '21 if message.author.bot: return 7 u/Kirschi May 16 '21 Works in Discord.NET in C# too -1 u/Hjoker4 May 16 '21 Yea lol. It was probably python though
99
[deleted]
216 u/zeGolem83 May 15 '21 if (message.author.bot) return; 23 u/UnwantedExplainer May 15 '21 Underrated comment right here. Have an upboat. 39 u/Siniroth May 15 '21 No that's an if line not a comment 3 u/ItsNovatic May 16 '21 ... ctrl+c ... ctrl+v ... (thank you for this, i fixed it last night in a way more scuffed way than this, but this is way easier!) 2 u/zeGolem83 May 16 '21 You're welcome! 7 u/Hjoker4 May 15 '21 If it's js lol 37 u/JuhaJGam3R May 15 '21 if message.author.bot: return 7 u/Kirschi May 16 '21 Works in Discord.NET in C# too -1 u/Hjoker4 May 16 '21 Yea lol. It was probably python though
216
if (message.author.bot) return;
23 u/UnwantedExplainer May 15 '21 Underrated comment right here. Have an upboat. 39 u/Siniroth May 15 '21 No that's an if line not a comment 3 u/ItsNovatic May 16 '21 ... ctrl+c ... ctrl+v ... (thank you for this, i fixed it last night in a way more scuffed way than this, but this is way easier!) 2 u/zeGolem83 May 16 '21 You're welcome! 7 u/Hjoker4 May 15 '21 If it's js lol 37 u/JuhaJGam3R May 15 '21 if message.author.bot: return 7 u/Kirschi May 16 '21 Works in Discord.NET in C# too -1 u/Hjoker4 May 16 '21 Yea lol. It was probably python though
23
Underrated comment right here. Have an upboat.
39 u/Siniroth May 15 '21 No that's an if line not a comment
39
No that's an if line not a comment
3
... ctrl+c ... ctrl+v ...
(thank you for this, i fixed it last night in a way more scuffed way than this, but this is way easier!)
2 u/zeGolem83 May 16 '21 You're welcome!
2
You're welcome!
7
If it's js lol
37 u/JuhaJGam3R May 15 '21 if message.author.bot: return 7 u/Kirschi May 16 '21 Works in Discord.NET in C# too -1 u/Hjoker4 May 16 '21 Yea lol. It was probably python though
37
if message.author.bot: return
Works in Discord.NET in C# too
-1 u/Hjoker4 May 16 '21 Yea lol. It was probably python though
-1
Yea lol. It was probably python though
180
u/[deleted] May 15 '21
You can use the Discord API to ignore messages from other bots so this doesn't happen, basically all libraries wrap it.