(discord.py) Get user’s, last message from a JSON file without specifying the name/id

I have an users.json file which store the user’s id and lmessage (current date,time) if he is write in a room. {“5314934047066510132”: {“lmessage”: “2021-04-21 10:21:01”}}…

Why is my cooldown sending even when there is no cooldown? discord.py

So I am attempting to create a cooldown for one of my commands. (The command) @commands.cooldown(1, 5, commands.BucketType.user) async def balance(ctx): await load_jsons(ctx) coins = users_w[…

Changing color of a discord role

Everything is set up right, the bot is in the discord, connected, etc. This code: import discord import random client = discord.Client() @client.event async def on_ready(): print(‘We have logged …

discord.py bot sends message each and finishes only when sending each words

I’m new in this, it’s really annoying that the bot would send each bad word one by one until it finishes. Here’s the code. @client.event async def on_message(message): if message.author == client….

Discord.py Stuck Trying to Loop Through Logs and Send to Server

I am trying to create a simple discord bot that parses a log file that is constantly being written to and sending the new lines to a discord channel I have on my server name logs. Parsing the file and …

I would like to make a discord bot that sends a message when a member goes online but I can’t seem to make it work ? (python)

I would like to make it so when a member goes online my both will send a message in the server welcoming the member but I cannot find a way to do so if I could get the name of the user too it would …

Using MongoDB on Discord.py for scheduled tasks

Purpose I have some commands like temp-mute, temp-ban, and other commands that need to be done after commands execution, and I do need to schedule things like giveaways and trigger a function as soon …

How to delete mp3 file after the bot played it

I am trying to create a music bot and now I want the bot to delete the current playing song after it finished playing. There’s my code: import asyncio import os import discord from discord.embeds …

Discord.py WELCOMER – How to make a custom image for welcome messages

I’d like to add the “custom” image for new discord users in my server. Just like this: Click here for the image. This is what I have for now: @client.event async def on_member_join(member): …

get only information of a specific guild

Hey so this code works completely fine but my problem is that it gets info of all the servers that the bot is in. @commands.Cog.listener() async def on_user_update(self, before, after): logs = …