Category : discord

having some issues and hopefully I can get some assistance :D… the code is below from ftplib import FTP import shutil import urllib.request as request from contextlib import closing import os import json import time import discord from discord.ext import commands from discord.utils import get with open(‘variables.json’) as f: variables = json.load(f) client = commands.Bot(command_prefix ..

Read more

I would like my bot to send a msg when someone joins the server (also mention them) @client.event async def on_member_join(member): print(‘welcome!’f'{member}’) the only thing i want to change is this should be displayed in the general channel (its printing it in the terminal now) and that instead of only displaying the person’s name i ..

Read more

The code will print on_ready but will not print on_member_join or on_member_leave. I’ve look at everything and I can’t seem to find the issue. import discord from discord.ext import commands client = commands.Bot(command_prefix = ‘.’) @client.event async def on_ready(): print(‘Bot is poopers.’) @client.event async def on_member_join(member): print(f'{member} has joined the server.’) @client.event async def on_member_remove(member): ..

Read more

I am working on a discord python bot, and am getting this error while checking for permissions. AttributeError: ‘NoneType’ object has no attribute ‘roles’ It’s for a ticket system, and if the user has any of the defined roles it allows the command. Here is the code: _ACCESS_ROLES = [ 781418737806344212 # Admin 783084051702480896 # ..

Read more

so I’m trying to make a discord bot in python and make a command that will display all timezones that I choose, but the problem is that all of these timezones are around 7-8 hours ahead of normal. import datetime from pytz import timezone localFormat = "%Y-%m-%d %H:%M:%S, %Z%z" UTC=datetime.datetime.utcnow() timezonelist = ["US/Eastern", "US/Central", "US/Mountain", ..

Read more

I tried to make a roll the dice commands its working but I don’t know why my embed image is not showing in the embed. @commands.command() async def aya(self, ctx): author = ctx.author roll = 1 #random.randint(1,6) print(roll) if roll == 1: file = discord.File("dice/dice1.png", filename="dice1.png") embed = discord.Embed( title= "Roll", color=discord.Color.blue() ) embed.set_thumbnail(url="attachment://dice/dice1.png") embed.add_field(name="Owner", ..

Read more