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
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 3,001 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  Creating Discord Bot: Unused import statement 'import discord EyeballCandy 0 3,648 Feb-02-2020, 10:53 PM
Last Post: EyeballCandy
  Compare all words in input() to all words in file Trianne 1 2,867 Oct-05-2018, 06:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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