Python Forum
discord bot (detect when someone types certain words)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
discord bot (detect when someone types certain words)
#1

Hello,
I am currently working on a discord bot and i have a question. how do i detect when someone in the discord chat types certain word combinations and then execute command? Anyone who knows how to make discord bot here?
Thanks!
Reply
#2
Without seeing any code, it'd probably look something like this:
class Bot(DiscordBotBase):
    def on_message(self, message):
        if "spammity spam" in message:
            self.send("Would you like spam with your Spam, Spam, Eggs, Bacon and Spam?")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help discord bot Edward 0 2,059 Sep-15-2022, 09:55 PM
Last Post: Edward
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,758 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  Discord Bot Dark_Sovereign_193 0 32,428 Jun-03-2021, 03:24 PM
Last Post: Dark_Sovereign_193
  Discord Bot Help Oshadha 0 1,384 Jan-26-2021, 04:23 PM
Last Post: Oshadha
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 3,516 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy
  Compare all words in input() to all words in file Trianne 1 2,716 Oct-05-2018, 06:27 PM
Last Post: ichabod801
  Discord Bot Arbys 7 27,296 Nov-06-2017, 03:36 PM
Last Post: Gamer
  discord bot lolteam 1 6,024 Aug-31-2017, 08:57 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020