-2

recently, I'm making a discord bot I made a anti-swearing filter so in that when a person sends a bad word IT GETS DELETED and the person will receive message but then I got an idea to also send message in the server to let admins know so I tried this here and this is what appears in discord here in discord Please I need help

  • Welcome to Stack Overflow. Please read [ask], and [do not upload images of code when asking a question.](//meta.stackoverflow.com/q/285551) Instead, copy and paste the relevant code [with proper formatting](https://stackoverflow.com/help/formatting). – Karl Knechtel Jun 01 '22 at 14:58

1 Answers1

-2

If you want to put a variable inside your string you should use f-strings, and getting the author of the message, which could be done using:

f'The user {message.author.username} has sweared'

Here you'll understand more about f-strings: https://he-arc.github.io/livre-python/fstrings/index.html

Exania
  • 96
  • 3