I’m trying to learn the basics of creating a chatbot. (I’m using the Python example bot as a basis) For one of the bot’s functions, it needs to be able to get the username of whoever entered a command. For instance,
def do_command(self, e, cmd): c = self.connection if cmd == "hello": message = "Hello, " + username + "!" c.privmsg(self.channel, message)
In this example function, how can I put the name of the user who entered the ‘!hello’ command into the ‘username’ string?
Sorry if this question is too simplistic, but I’m struggling to find documentation for this stuff that I’m actually able to understand.