Relative Content

Tag Archive for pythondiscorddiscord.pybots

Python Discord Bot: Github broke my bot’s start command

I’m working on a discord bot in python in Visual Studio Code. I went on vacation about a week ago and uploaded my current code to github before I left with the intent of working on it when I had some downtime, which I didn’t end up doing. Returning home and attempting to run the bot, my bot would load everything from my cogs folder, the bot would start running, but it wouldn’t respond to any commands. No error messages, nothing. After a while, the bot would just go offline. Debug text in the terminal

Discord Bot Not Registering Slash Commands in Command Tree

I have a “Commands.py” file that hosts all the logic behind my commands and for some reason it’s not registering my commands. My main.py calls my register_commands function passing in Client and in there it is supposed to register my client commands. Here is the code for that.

How to implement a blacklist feature for a Discord bot

So I’m writing a custom bot in python that has a variety of functions for my server, and I’m wanting to write a function/feature where it can effectively blacklist members regardless of whether they are in the server or not. That being said, I don’t want the feature to ban members, as my server has a policy of, instead of banning people outright, they are given a specific role (‘clown’) that bars them from communicating in any channel except for a role-specific channel (aptly named ‘circus’). Right now I’m thinking of implementing a command that extracts a user’s ID into a blacklist.json file, then checks for the ID in the json and assigns the role accordingly. Thing is, I’m having trouble actually getting it to work. Any help would be appreciated.

Discord bot that mentions people at specific time randomly pings

I built a bot to ping people at certain time in the day (for fun lol) but the bot seems to randomly ping at random times in the day and doesn’t print a message to terminal as it should’ve if it were a usual ping. This has happened twice already and caused a lot of frustration since obviously people don’t really like getting pinged for no reason.
I’m hosting this bot on Bot-Hosting.