This bot can send random text from txt file or random image from directory and it can delete message if the message contains word that you banned. It can also send and article from wikipedia based on user input. Users can create their own qrcode. And simple chat system (bot can response if someone write his name).
- Random text from file
- Random images from folder
- Banned words from txt file
- Send wikipedia article based on user input
- Create qr code based on user input
- Send 3 news
- Rock Paper and Scissors game
- Random number in range, based on user input
- Guess the number game
- Convert currency to another currency
- Simple chat system
- Install python and pip
- Download and unzip this repository
- Open unziped folder
- Install modules (open cmd or powershell in unziped folder)
pip install -r requirements.txt
- Get a Discord Bot Token
-When adding a discord bot to your server give him permissions : Read Messages/View Channels, Send Messages, Manage Messages, Embed Links, Attach Files, Read Message History - Enable intent for bot
-Enable only message content intent - Create file named .env in main unziped folder and open it with notepad. Add
DISCORD_TOKEN='YOURSUPERSECRETTOKEN'
replace the YOURSUPERSECRETTOKEN with your bot token (keep the quotation marks) - Run bot.py with python
-
- Edit the text.txt file in text directory
-
- Add or remove images inside images directory
- Supported file extensions are : png, jpg, jpeg, gif
-
- Edit words.txt file in ban words directory
-
Find function
async def chat_with_bot(msg)
in bot.py -
Inside function you can find variables like
greetings
orname_to_react
and more...greetings = ("hi", "hello", "was-sup", "sup") name_to_react = ("bot", "robot")
-
Change it to whatever you want
greetings = ("aloha", "Bonjour", "Hola") name_to_react = ("superbot", "bestrobot")
-
Find this line in bot.py
bot = commands.Bot(command_prefix='!', intents=intents, help_command=help_command)
-
Edit the command_prefix
bot = commands.Bot(command_prefix='your_command_prefix', intents=intents, help_command=help_command)
-
Find command in bot.py that you want to change (For example I choose !image)
@bot.command(name='image', help='Send random image to chat')
-
Edit the name of command and help of command
@bot.command(name='your_command_name', help='your_help_message')
-
Find command that you want to change (For example I choose !text)
-
After that find function that handle the embed in
await emb.send_embed(ctx, title=random_text)
-
Finally you can edit the message (Supported arguments for the function are title, description, color)
await emb.send_embed(ctx, title=f"Your random text is {random_text}", description="This is a description", color=discord.Color.orange())
- Remember that you need to always include argument ctx
- If you don't write argument description, the description would be empty
- Or if you don't write argument color default color will be blue
- Argument color can be hex color code like 0xe0ab76 (0xhex_color_code) or discord Class Color like discord.Color.orange() (discord.Color.yourcolor()) or color can be None
!text (random text from text.txt file)
!image (random image from images folder)
!whatis (Send wikipedia article based on user input)
!qrcode "what do you want in qrcode" (Send qrcode based on user input)
!news (Send 3 news)
!rpas "you can choice rock,paper,scissors" (Rock Paper and Scissors game)
!random from "your number" to "your number" (Random number)
!gtn (Guess the number game)
!convert (Convert currency to another currency)