import discord
from discord import guild
s = discord.client.Client
from discord import invite
c = 0
class X:
def handle_response(message) -> str:
p_message = message.lower()
if p_message == 'hello':
return 'Hey'
if p_message == 'roll':
return str(random.randint(1,6))
if p_message == '!help':
return "`This is a help message.`"
if p_message == 'url':
z = discord.Invite.code[int]
y = guild.Guild.shard_id
i = discord.guild.Guild.id[int]
discord.guild.Guild.id
def __getitem__(self, id):
return self.__dict__[id]
return print[id]
Here's a small snippet of my code, I've looked at tutorials online at various different places and implemented them but it seems to just give me the same type of error every time, I know I'm doing something wrong but I'm not sure quite what it is. I would appreciate the help, thanks.
I'm trying to get the code var in an integer form but it isn't working at the current moment, specifically this snippet: discord.Invite.code[int]