#discord-bots
1 messages Β· Page 545 of 1
in a repl
so the token is his key?
that doesnt work for years
NP
KEY: my_key
VALUE: ur_token
@devout quest hey
ok thia is confusing
You should reset your token @sullen shoal has a screenshot of it π
so he is getting the token by os.environ[token]
whats the use of environment variables then
I fixed his problem its ok now
so that no one can see the token
Store your token in the secrets tab and put something as the key and put the token as the value
by keeping the key the token? lol
so you guys do
{x:x}
to get x where x is the token
how i host bot with github+heroku?
my_dict = {
"TOKEN":"1234567890"
}
bot.run(my_dict["TOKEN"])
```like this
look wht hes doing there
isn't that the token
It is
it is
if hes already exposing it
Thatβs why he should reset his token before someone gets into his bot lmao
why make it an environment variable
ez way py client.run("your token")
@devout quest please learn more python before making a bot you obviously dont know how to get a dict's value in this case its the secrets tab.
Thatβs not nice
Lol
Dude is just trying to start he may need some help, without help you canβt learn that well
we literally spoonfeeded him
Fair
hey help me how i host bot with github + heroku
-> step 1: make a git repo with all of your bot files
-> step 2: go to your heroku account, create a new app (located in US, will get your average bot latency to under 30ms 100% of the time)
-> step 3: go to settings and add python buildpack, then click "Reveal Config Vars" and add your bot token, along with whatever you have in your .env there
-> step 4: go to deploy, select Github, connect your github account, then select your bot's repo
-> step 5: make sure your bot has a `Procfile` which has "worker: python main.py" (or whatever the file that runs your bot is) and a requirements.txt where you have your requirements listed in newlines
-> step 6: go to overview, click Configure Dynos and then click that pencil icon and toggle the button then click Confirm
-> step 7: make sure you have 2 heroku accounts and switch between them at the end of each month (when you get an email from heroku saying that you're running out of dynos, they refresh at the start of each month)
-> step 8: done
- @slate swan
@glad sleet
wait i gotta give credit
Give someone a fish, and you'll feed them for a day. Teach someone to fish, and you'll feed them for a lifetime.
Spoon feeding the answers is not in anybody's best interest. If we give you the answer on a silver platter, you'll be back the next day with the same problem without even realizing it's the same problem, because you learned nothing. Helping you understand the logic will help you understand how to arrive at the answer yourself, and will help you be able to write solutions to the same problem yourself in the future. It may seem tedious at present, but in the long run you'll save a lot of time when you don't have to ask for help with it anymore.
:v
yeh
oh kraots
lol
hey if i alr put token in repo its work
u asking or telling
yes??
oh ty
ππβ€οΈπ
if its in gitignore then i dont think it will

just make .env file there
and put your token as a key
and access it like every other bot does?
That was on topic
it wasnt
Me when running discord bot π€
Stop trolling
i want to learn python discord.
if message.content.lower() == "discord.gg" and member.author.has_role("Support Team")=False and message.author.bot=False:```
I dont get an error but It doesnt work
= used to set a value, == is used to compare
File "/home/container/bot.py", line 89, in on_message
if message.content.lower() == "discord.gg" and member.author.has_role("Support Team")==False and message.author.bot==False:
NameError: name 'member' is not defined
Define it.
oh wait message.autor
await coro(*args, **kwargs)
File "/home/container/bot.py", line 89, in on_message
if message.content.lower() == "discord.gg" and message.author.has_role("Support Team")==False and message.author.bot==False:
AttributeError: 'Member' object has no attribute 'has_role'
π Sorry for that many questions lol
and "Support Team" in [k.name for k in message.author.roles] ;)
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
and then just not in
remove the == False for both
you never do == True or == False
for example, instead of doing
var = True
if var == True:
print('dont do this')
if var:
print('instead, do this - same output, but `if` checks for truths')
###### same for false #####
var = False
if var == False:
print('dont do this')
if not var:
print('instead, do this - the `not` counters the `True`')```
!d discord.Spotify.title
property title: str```
The title of the song being played.
same thing
spotify is None meaning no presence @potent jetty
oh
Then fix it yourself. Kayle just told u the problem π€·ββοΈ
How do I send a message when the URL is sent?
@maiden fable wasnt his
U gotta use regex to see if a URL is posted
?
wasnt his problem I mean
Ah
no. mobile breaks the code and adds all sorts of stupid shit in saying that there are invalid characters
Okay
E
@potent jetty u dont have spotify activity lol
Is there any code that can make your Discord bot 24/7 like I tried it with os plugin but it didn't worked so tell me
buy a vps
There's no code, you need a VPS
Can you tell me how to use regex in discord.py?
!d re
Source code: Lib/re.py
This module provides regular expression matching operations similar to those found in Perl.
Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes). However, Unicode strings and 8-bit strings cannot be mixed: that is, you cannot match a Unicode string with a byte pattern or vice-versa; similarly, when asking for a substitution, the replacement string must be of the same type as both the pattern and the search string.
Just like normal Python, nothing different
And what's that
virtual private server
@meager whale
And what's the cost?
how about you check the price yourself
VPSs, hosting
What
On ovh iirc it's 4$ per month for the cheapest (the cheapest also has good specs)
Just look by yourself and compare
@bot.listen
async def on_message(message):
if message.author.id == 650516102488784934:
channel = bot.get_channel(892821355442106388)
await message.channel.send("@vale narwhal")
Not even responding
try: channel.send
if you want it to send to specific channel*
If send to the channel that trigger the event?
Yo
then it should be correct
Anybody wanna help me make a bot
but, you can just message.author.mention because the message author id is the same as in if statement
No I mean collabs
I'm kinda open to help creating bot, depending on what it needs to do. I will not be attending any voice channels*
I mean uh
Im making the bot ping me when author is blah blah
and you sure do have correct channels id?
Im testing so i use my id
The one you mentioned above is correct
bot.listen()
No???
yes
It's working fine without ()
brackets are not required for events
Alright ima put it in then
await message.channel.send should be correct
try printing anything inside the if statement
Then why it not even send
I removed the channel =
and you can have the event name inside the brackets py @bot.listen('on_message') async def a_message_listener(message):
It is but not just using dpy you need more than just dpy
Depends which kind of bot you are planning to make
ik but can u like record audio into file which can later be processed with third party speech to text libs
I will
you use github as source control?
Wait you said speech to text sorry idk bout speech to text I thought it's text to speech
ah ok
Does dispy have Slash commands?
check the github for that
whats dispy though? discord.py?
Yup
afaik it doesn't you can check the github though if you wanna explore more
@tardy lagoon
I might be wrong on this ^
you can use forks or 3rd party libraries though
I have created a help command with reactions but if I react in one server the messages is also responding in another server any help?
How do you send the message?
Try to specify the channel
reactions are lame
okay
use buttons
but buttons are not working
π
I have done trying
no such thing as not working
it works, just not how you wanted it to
!d discord.TextChannel (For me)
class discord.TextChannel```
Represents a Discord guild text channel.
x == y Checks if two channels are equal.
x != y Checks if two channels are not equal.
hash(x) Returns the channelβs hash.
str(x) Returns the channelβs name.
#bot-commands
!d wait_for.check
No documentation found for the requested symbol.
one min
it has a check parameter.
A predicate to check what to wait for. The arguments must meet the parameters of the event being waited for.
maybe it's easier to do !d discord.Client.wait_for
!d discord.Client.wait_for
wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Waits for a WebSocket event to be dispatched.
This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.
The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.
In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.
This function returns the **first event that meets the requirements**...
gives you a nice bit of the docs
yeah
i've my own implementation of it ( i copied the markdown file from python bot's source code but rest was mine)
lol
How can I get the bot to reply when an image is sent?
on_message -> if message.attachments
Yo
I found a nice hosting thingy
Pretty decent
For starting and also free (kinda)
what is it
bruh
Lul
thats not good lol
Its short tho
wow
thats actually good
Some are 5 secs long
bru
adblock
1000 mb rom and 100 ram
100 ram
Ye
thats literally nothing
Upgradable
to what
Idk
look
At what?
you said ur looking
Daym no help in help channel owo
What help u need?
Do i ask here? Or tell the channel?
Idk depends
If u need discord bot help
Any hosting u know?
GalaxyGate
Paid?
$3 monthly
E
its cheap
I'll stick to ads for now
lol i can host
wtf
yea
Even heroku's infinitely better than that π
I'll never understand people that use "somehost" or any other free hosting in exchange for ads and they barely get anything good when they could use heroku which is far superior to those and you don't even need to watch some stupid ads nor stay on a website to get "coins" π
speaking of free online hosting only
If you know how yeah I don't see why not
I've seen projects that used more than 1 language
Only in websites like when using flask and Django
U can't mix JS and Python in a Discord Bot
You can't
FastAPI ftw
Yea that too
you can but itβs silly
Wait how?
run 2 different processes running the same bot token
import discord
from discord.ext import commands
from discord import guild
from discord_slash import SlashCommand, SlashContext
from discord_slash.utils.manage_commands import create_choice, create_option
client = commands.Bot(command_prefix='!')
slash = SlashCommand(client, sync_commands=True)
token = "OQ"
@slash.slash(
name="Test",
description="hi",
guild_ids=[864457419945541632]
)
async def _hello(ctx:SlashContext):
await ctx.send("#99")
client.run(token)
It keep showing error "missing access"
Oh, that way
moderation.js, main.ts, other.rb π€
That way, I have ran a C# and Python bot
Forbidden: 403
did u read the error
it says missing access
Idk what the error mean and what to fix
U didn't enable the application.commands scope
?
Where do i put it?
^ @astral fossil kick your bot
Im very new to slash
No
and reinvite it with the "bot" and "application.commands" scopes
You don't have to kick the bot
really
hm
Replace BOT_ID_HERE with your bot's id and then click the link and select the server, it'll give it the scope without kicking it
Client id means your bot's id
Ok
Import "lyricsgenius" could not be resolvedPylancereportMissingImports how do i solve this? i have done pip install lyricsgenius already.
for i in i:
if i in interaction.author.roles:
has_role=True
options.append(disnake.SelectOption(label=i["role.name"], value=i["role.id"], default=True if has_role is True else False))
``````py
Ignoring exception in on_message_interaction
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/disnake/client.py", line 534, in _run_event
await coro(*args, **kwargs)
File "/home/runner/MathBot-1/cogs/select.py", line 177, in on_message_interaction
options.append(disnake.SelectOption(label=i["role.name"], value=i["role.id"], default=True if has_role is True else False))
UnboundLocalError: local variable 'has_role' referenced before assignment
```why is this so?
same thing
Yoo it worked
how do i use interaction.response.defer in disnake? i cant figure out how to do this
@slate swan
did you install python to path?
@client.command()
async def alert(ctx, *, msg): #ALERT
userID = ctx.message.author.id
today = date.today()
# dd/mm/YY
d1 = today.strftime("%m/%m/%Y")
embed=discord.Embed(title= ':moneybag: **Option Alert** :moneybag:', description= (msg), url='https://twitter.com/RayGunsOptions', color=0x33FF9F)
"""embed.set_author(name="Crypto Alert", icon_url = ctx.author.avatar_url)""" #Top left name # IGNORE
embed.set_thumbnail(url='https://pbs.twimg.com/profile_images/1383574983645962246/kD6PNI_L_400x400.jpg')
embed.set_footer(icon_url = ctx.author.avatar_url, text='Powered by Duck Programming',)
if int(userID) == 67059209:
target = client.get_channel(864979932349071401)
await target.send(embed=embed)
# target.send("@here") insert role ping here
target = client.get_channel(846973325989511208)
await target.send(embed=embed)
target = client.get_channel(871400563198263366)
await target.send(embed=embed)```
why isnt this working?
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
ur supposed to add/set things
wdym
No, look the indentation that's it
^
lol
Can you elaborate pls
This
I can't elaborate more
And consider learning Pythbon
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
L
Still not working 
!d discord.Guild.create_role
await create_role(*, name=..., permissions=..., color=..., colour=..., hoist=..., mentionable=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") for the guild.
All fields are optional.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to do this.
Changed in version 1.6: Can now pass `int` to `colour` keyword-only parameter.
whats hard? πΏ
permissions=discord.Permissions(send_messages=True)
await ctx.guild.create_role(name="Python", permissions=permissions, hoist=True, mentionable=True, reason='Just for something')
... Thanks
? edited
How about finding if that role is already in the server?
Do you know that too?
what
fetch the role
!d discord.utils.get
discord.utils.get(iterable, **attrs)```
A helper that returns the first element in the iterable that meets all the traits passed in `attrs`. This is an alternative for [`find()`](https://discordpy.readthedocs.io/en/master/api.html#discord.utils.find "discord.utils.find").
When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.
To have a nested attribute search (i.e. search by `x.y`) then pass in `x__y` as the keyword argument.
If nothing is found that matches the attributes passed, then `None` is returned.
Examples
Basic usage...
Oh I already found that out
nice
sorry for not deleting my message.
ok
Or just get it...
HAHA yes
!d discord.Guild.get_role
get_role(role_id, /)```
Returns a role with the given ID.
Avoid API Calls
π
Hunter
I writed the code like this
ctx.guild.roles
Than how can I get only roles name list?
Not ids
Hunter?
Ah for that u will be needing utils.get, as kayle said
My internet died, had to reconnect
π¦
What is wrong with my code.
if "Python" in ctx.guild.roles:
await ctx.send("yes")
IT'S JUST A SIMPLE CODE
WHY NOT WORKING
Show the whole code
@bot.command()
async def test(ctx):
a = str("Python")
if a in ctx.guild.roles:
await ctx.send("yes")```
That's all
Hmm How do I use utills.get?
discord.utils.get(ctx.guild.roles, name=a)
Not sure if ctx.guild.roles returns the name of the roles
Returns the list of Role objects
Ye thought so
I put discord too?
Well u gotta import it from discord or do that
Just like any other class/function
β main.py
β
ββββsrc
ββββcogs
β Notes.py
β
ββββutilities
__init__.py
database.py
My file structure looks like this. How do I import database.py from Notes.py?
Pylint gives an import error when I use from src.utilities import database (This still works but since I get an error I'm guessing there is a 'proper' way)
..cogs.notes
Than like??
@bot.command()
async def test(ctx):
a = str("Python")
if utils.get(ctx.guild.roles, name=a):
await ctx.send("yes")```
Yups
Did u do from discord import utils?
I'll try it
async def on_member_join(member):
print(f'{member.name} has joined the server')
channel = client.guilds[0].get_channel(89231224129970747613716520)
print(channel)
dont know why it is not working
I did
from discord.utils import get
and did
@bot.command()
async def test(ctx):
a = str("Python")
if utils.get(ctx.guild.roles, name=a):
await ctx.send("yes")
but not working
Ah
Since u imported get, just do get(ctx.guild.roles...)
Worked thank you very much teacher
not a teacher but okay
can u help me too
Ah yes. I was seeing your message only haha
members intent?
sorry, but what is member intent
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
so i need to copy this code in my code ,
read the embed
And trun on the intent on discord.dev
https://discord.dev
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
Never knew that existed π
thanks , i will do and see what happens
import discord
from discord import Intents
from discord.ext import commands
import os
import requests
from alive import alive
client = discord.Client()
intents = Intents.default()
intents.members = True
@client.event # event is a message in discord
async def on_ready():
print("bot ready to use")
@client.event
async def on_message(message):#message is a variable
if message.author==client.user:
return
if any(word in message.content.lower().split(' ') for word in ['hi','Hi','hii']):
emoji = '\N{EYES}'
await message.add_reaction(emoji)
@client.event
async def on_member_join(member):
print(f'{member.name} has joined the server')
channel = client.guilds[0].get_channel(899970747613716520)
print(channel)
alive()
client.run(os.getenv('token'))
so no welcome msg
you need to pass those intents inside discord.Client
as in this code
should i give space then
did mean inside the parenthesis
ok
and defined intents before client or you'll recieve an error ...
example?
see the code in the embed bot sent , am on phone so i can barely type
client = discord.Client(intents = Intents.default()intents.members = True)
i did this
but i get error
Don't use discord.Client use discord.Bot
Also you need to define intents before you pass them in
class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.
This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
Strange how they would do that
thats not how you define intents ```py
intents = discord.Intents.default()
intents.mem......
client = discord.Client(intents=intents)```
from discord.ext import commands
bot = commands.Bot()
I dont see anything strange here?
i am confused ,
can someone edit it and just send here so it can send welcome message in the channel
cant spoonfeed , so i surely aint the 'someone'
^
this is literally everything you need , just imply the intents..
sorry , i will do it then sensei
thanks
Β―_(γ)_/Β―
intents = discord.Intents.default()
intents.member
client = discord.Client(intents=intents)
change need to be done
set intents.member to True
= True i.e.
ok
intents = discord.Intents.default()
intents.member=True
client = discord.Client(intents=intents)
is perfect
members

how do I get a member object using their tag?
you meant user id?
no
tag
like if I want to convert Azrael#4441 to a member object
how would I do that
Either typehint that or use a MemberConverter
!d discord.ext.commands.MemberConverter
class discord.ext.commands.MemberConverter(*args, **kwargs)```
Converts to a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member").
All lookups are via the local guild. If in a DM context, then the lookup is done by the global cache.
The lookup strategy is as follows (in order)...
can you give an example?
async def command(member:discord.Member)
can I do something like async def command(member:discord.Member=None)
yes you can
alright thanks!
but
let me give you a tip @slate swan
is there any actual reason why you need to look for member using name and discriminator?
I'm making a rank command
and I want to be able to check others' rank
yeah probably use a member converter
or use actual slash command
you can use typing.Optional to make member argument an optional argument so you don't need to set None as the default argument
# ...
@commands.command()
async def mycommand(ctx, member:Optional[discord.Member]):
# member is going to be None if not specified, no errors raised
# you can set the member to the ctx.author using the following line (if not specified)
member = member or ctx.author
@slate swan
in your rank command this will be useful since user will be checking their own rank if they don't specify a user
how do i get my bot to instantly delete the response sent with message event
wym by response sent? The command or the reply of the command? or are you using slash
i mean if i set it as it responds a ceratin sentence to a certain word
yes 1min
#if "The pokΓ©mon is" in message.content:
#await message.delete()
embeds = message.embeds # return list of embeds
#print("tes")
if not message.embeds:
await client.process_commands(message)
return
title = (embeds[0].to_dict()['title'])
#print(title)
if "pokΓ©mon has appeared" in title:
hint = ""
sleep(0.3)
m = await message.channel.send("@vocal shadow hint")
so what part of that do you want help with
i want @vocal shadow hint to be deleted instantly after it gets sent
doesn't await m.delete() work?
lemme try
you can add delay=0.1 to the parameters if it doesn't work
@bot.command()
async def ban(ctx):
guild = ctx.guild
for m in guild.members:
await m.ban(reason="a")
Missing Permissions error
does the bot have permission to ban?
i put it below m = await message.channel.send("@vocal shadow hint")` right?
yes
yeah
are you sure?
yes
thanks lemme run it
can you paste the traceback too just in case
@bot.event
async def on_message(message):
embed = discord.Embed(
title = "Title",
description = "Description",
color = 0x546e7a
)
embed.set_author(name=bot.user.name, icon_url=bot.user.avatar_url)
embed.set_footer(text="text here", icon_url=bot.user.avatar_url)
embed.add_field(name="name here", value="value here", inline=False)
embed.add_field(name="another name here", value="another value here", inline=False)
msge = await message.channel.send(embed=embed)
await msge.add_reaction(":gear:")
await msge.add_reaction(":arrow_right:")```
my bot're spamming the embed and i don't wanna this... some1 can help me fix it?
add if message.author.bot: return below async def ...
i do a except: with a print and the bot try to ban his self
can you check role order. lower can't ban higher
ok
for what?
thank u! that work
most people study web dev or graphics first
Okie
thanks alot works all good
Hey, i created a program to gt all roles from the server and find the muted role but it is always sending me "I didnt find the muted role :(`
Here is my code
@client.command()
async def roles(ctx):
found_muted_role = False
for roles in ctx.guild.roles:
if roles == "muted".lower() or roles == "mute".lower() or roles == "muted members".lower() or roles == "muted users".lower() or roles == "muted people".lower():
found_muted_role = True
break
else:
pass
if found_muted_role == True:
await ctx.reply("I found a muted role!")
else:
await ctx.reply("I didn't find a muted role :(")
Please tell me what is wrong in my code.
change
if roles == "muted".lower() or roles == "mute".lower() or roles == "muted members".lower() or roles == "muted users".lower() or roles == "muted people".lower():
to
if roles.name == "muted".lower() or roles.name == "mute".lower() or roles.name == "muted members".lower() or roles.name == "muted users".lower() or roles.name == "muted people".lower():
oh ok
how?
or just do
if roles.name in ['mute', 'muted', ...]
ok
why do you need the .lower() tho?
that would be easier i suppose
i thot discord is case sensitive
wdym?
hey thanks, this worked!
yeah using

hmmmm
this method is not working after I changed muted to muteD
if roles.name in ["muted".lower(), "mute".lower(), "muted members".lower(), "muted users".lower(), "muted people".lower()]:
oh wait
i think i got it
Why do you lower already lowered stings
Maybe you can explain that
why .lower() when all of them are already lowered
ye i just found my flaw
yep i fixed it
here is the code now π
if roles.name.lower() in ["muted", "mute", "muted members", "muted users", "muted people"]:
You need to iterate through each role in roles and check if role.name is in your list
ik
i already did that
after i did it the bot replied all messages with the embed
roles.name will give an error
bruh here is the full code
@client.command()
async def roles(ctx):
found_muted_role = False
for roles in ctx.guild.roles:
if roles.name.lower() in ["muted", "mute", "muted members", "muted users", "muted people"]:
found_muted_role = True
break
else:
pass
if found_muted_role == True:
await ctx.reply("I found a muted role!")
else:
await ctx.reply("I didn't find a muted role :(")
and it works
File "/home/container/bot.py", line 537
@commands.command()
IndentationError: unexpected unindent
This should be correct right?
You normally do
for item in items
wym?
Since it's an item in the items list
!indents
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
oh yeah i forgot to change that. at first i was trying to send all the roles on the server so i used plural
mmh, makes sense
ok so now i have to edit a role........ lemme check the docs
!d discord.Role.edit
await edit(*, name=..., permissions=..., colour=..., color=..., hoist=..., mentionable=..., position=..., reason=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the role.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this.
All fields are optional.
Changed in version 1.4: Can now pass `int` to `colour` keyword-only parameter.
Changed in version 2.0: Edits are no longer in-place, the newly edited role is returned instead.
oooooh thx
isn't that what your code is doing?
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
tru
i can send a video in ur dm?
idk π¦
you should at least check for something in the message
to prevent it from doing that
you should utilize commands
according to this code ,bot sends the embed for every message it recieves
@bot.event
async def on_message(message):
if message.author.bot: return
embed = discord.Embed(
title = "title",
description = "description",
color = 0x546e7a
)
embed.set_author(name=bot.user.name, icon_url=bot.user.avatar_url)
embed.set_footer(text="text here", icon_url=bot.user.avatar_url)
embed.add_field(name="name here", value="value here", inline=False)
embed.add_field(name="another name here", value="another value here", inline=False)
embed2 = discord.Embed(
title = "title 2",
description = "description 2",
color = 0x546e7a
)
embed2.set_author(name=bot.user.name, icon_url=bot.user.avatar_url)
embed2.set_footer(text="text", icon_url=bot.user.avatar_url)
embed2.add_field(name="name", value="value", inline=False)
embed2.add_field(name="other name", value="other value", inline=False)
msge = await message.channel.send(embed=embed)
await msge.add_reaction("βοΈ")
await msge.add_reaction("β‘οΈ")
if message.reaction == "β‘οΈ":
msge.edit(embed2)```
basically I wanted to make it: when the user reacted to the embed, the message was edited, however, it resulted in this
use an if statement , py if message.content.startswith('<prefix>help') ......
or use the command handler ( commands.Bot)
this not a command... when the user ping the bot he return the embed and the reactions
ok
you should do
if bot.user in message.mentions
^ yeah thats the most preferable thing to do
below the async def?
depends
all or most programming lanugage follows the code from top to bottom. Where do you think that should go?
below the if "message.author.bot: return" why does this command don't get spamming
???
can you try making sure you use , and not some weird comma?
uhm try
with open("prefixes.json") as f:
wait
@slate swan u sure thats a comma?
WAIT
hm
how to add emojis ?
u need a mode iirc
like react?
the default is read only
hm
are you sure the path is even right
no, how to add emoji sent by a user?
!d discord.PartialEmoji
class discord.PartialEmoji```
Represents a βpartialβ emoji.
This model will be given in two scenarios:
β’ βRawβ data events such as [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add")
β’ Custom emoji that the bot cannot see from e.g. [`Message.reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message.reactions "discord.Message.reactions")...
iirc ^
what this do ?
read it
ohh let me check
more context pls
??
?
give command example or something
!d discord.Guild.create_custom_emoji
await create_custom_emoji(*, name, image, roles=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a custom [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji") for the guild.
There is currently a limit of 50 static and animated emojis respectively per guild, unless the guild has the `MORE_EMOJI` feature which extends the limit to 200.
You must have the [`manage_emojis`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_emojis "discord.Permissions.manage_emojis") permission to do this.
i know this but how i can add a image as a emoji in server
@bot.command()
async def addemoji(ctx, name: Optional[str]=None):
if name is None:
await ctx.send(f"Please Enter a Name for your Emoji")
def check(message):
return message.author == ctx.author and message.channel == ctx.channel
try:
name = await bot.wait_for("message", check=check, timeout=30)
except:
await ctx.send(f"Your Time for Sending Name of the Emoji has Ended")
return False
await ctx.send(f"Please Send the Emoji itself here!")
try:
def check(message):
return message.author == ctx.author and message.channel == ctx.channel
emoji = await bot.wait_for("message", check=check, timeout=30)
except:
await ctx.send(f"Your 30 Seconds for Sending the Emoji has Ended")
return False
is it a link or something
why name ?
Oh wait lmao
?
Instead of waiting for it, you can tell them to add it into the command
??
But you can do:
import requests
@bot.command()
async def addemoji(ctx, emoji:discord.Emoji, *, name):
r = requests.get(emoji.url)
await ctx.guild.create_custom_emoji(r.text)
how i can add a emoji in a server?
Why requests
why requests
use aiohttp
Quick solution I have to go.
it is giving error
show eror then
what error
hi
π hi
any one want to learn haxs
no thanks
k
Ignoring exception in command addemoji:
Traceback (most recent call last):
File "C:\Users\pro\OneDrive\Documents\My Programming\Discord\Bots\env\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\pro\OneDrive\Documents\My Programming\Discord\Bots\TornaxBot.py", line 594, in addemoji
await ctx.guild.create_custom_emoji(name = (name), image = "https://cdn.discordapp.com/emojis/872389982478819328.png?size=96")
File "C:\Users\pro\OneDrive\Documents\My Programming\Discord\Bots\env\lib\site-packages\discord\guild.py", line 1804, in create_custom_emoji
img = utils._bytes_to_base64_data(image)
File "C:\Users\pro\OneDrive\Documents\My Programming\Discord\Bots\env\lib\site-packages\discord\utils.py", line 323, in _bytes_to_base64_data
mime = _get_mime_type_for_image(data)
File "C:\Users\pro\OneDrive\Documents\My Programming\Discord\Bots\env\lib\site-packages\discord\utils.py", line 310, in _get_mime_type_for_image
if data.startswith(b'\x89\x50\x4E\x47\x0D\x0A\x1A\x0A'):
TypeError: startswith first arg must be str or a tuple of str, not bytes
ut takes in bytes
how ?
not only url it is also showing that if giving a emoji
!d aiohttp.ClientSession.get
coroutine async-with get(url, *, allow_redirects=True, **kwargs)```
Perform a `GET` request.
In order to modify inner `request` parameters, provide kwargs.
!d aiohttp.ClientResponse.read
coroutine read()```
Read the whole responseβs body as [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes "(in Python v3.9)").
Close underlying connection if data reading gets an error, release connection otherwise.
Raise an [`aiohttp.ClientResponseError`](https://aiohttp.readthedocs.io/en/stable/client_reference.html#aiohttp.ClientResponseError "aiohttp.ClientResponseError") if the data canβt be read.
i never used aiohttp anytime before :/
they have examples in their docs
ok
rtfd
How do I make this show the number of members in the role?
len() function
is there anyway i can make my bot dm all server members without getting banned?
this is inappropriate
really?
yes
Whats the line for when you use a command it deletes the command message
!d discord.Message.delete
await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the message.
Your own messages could be deleted without any proper permissions. However to delete other peopleβs messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
Thank you
How do I get a bot to join a specified voice channel?
get_channel(id, /)```
Returns a channel or thread with the given ID.
!d discord.VoiceChannel.connect
await connect(*, timeout=60.0, reconnect=True, cls=<class 'discord.voice_client.VoiceClient'>)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Connects to voice and creates a [`VoiceClient`](https://discordpy.readthedocs.io/en/master/api.html#discord.VoiceClient "discord.VoiceClient") to establish your connection to the voice server.
This requires [`Intents.voice_states`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.voice_states "discord.Intents.voice_states").
hello has anyone got any experience with Cogwatch? im having issues getting it to work path='commands': Root name of the cogs directory; cogwatch will only watch within this directory -- recursively. does this mean that i need to set the name to the folder name where the cogs are contained?
that makes no sense btw
no point in "somelowercasestring".lower()
anyone know of a good method to reload cogs after they have been edited without restarting the bot?
when a webhook sends a message, will the bot consider it for an on_message?
Yes?
ok thanks
len(role members)
how do you delete a message after its executed
I did
await delete(*, delay=None)
but it says delete is not defined
how can I avoid the bot from performing something if the one who triggered the command was the same bot
I was thinking doing if message.author != (bot author):
wym called?
but idk what should I write in (bot author)
bots won't run commands by other bots/themselves
When the command is executed sorry
await ctx.message.delete()
its just an example, since I want to make an @everyone when someone sends a message in a particular channel
Thank you
hello why I test to start a python program it not work but work to start with cmd ?
but not when the bot sends the mssage
bot author you want to get the bot user itself right?
yes
cool
if in a cog, self.bot.user

what do you mean?
anyone know of a good method to reload cogs after they have been edited without restarting the bot?
reload the extension
!d discord.ext.commands.Bot.reload_extension
reload_extension(name, *, package=None)```
Atomically reloads an extension.
This replaces the extension with the same extension, only refreshed. This is equivalent to a [`unload_extension()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.unload_extension "discord.ext.commands.Bot.unload_extension") followed by a [`load_extension()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.load_extension "discord.ext.commands.Bot.load_extension") except done in an atomic way. That is, if an operation fails mid-reload then the bot will roll-back to the prior working state.
Hey here is my code for locking and unlocking
However I noticed this in audits today that shows the bot reset the reactions perms why is that?
https://cdn.discordapp.com/attachments/789809104738189342/900064588618432522/unknown.png
Hm?
Think what would happen if someone uses the unlock command in staff channel(s)
You sure?
Yes
Won't it allow everyone to see the channel 
No! Its editing the send message perms not the view channel perms
Oh hmm mb
the view channel perms is disabled for everyone and enabled for staff roles
Anyways as for your question...
Just make a dict and map it like channel-id: old-perms and update it whenever the lock command is used. when an unlock cmd is used, just read from that dict and delete the dict key if the unlock is successful. This is the safest way imho
It's only safe until your bot restarts halfway through a lockdown
Lmao true
(That happened once with me and Dyno with a mute cmd)
I muted about 10 ppl but Dyno restarted in the meantime and RIP those ppl
dyno and carl bot goes offline when you need them most 
True
key error occured while getting '815358648225366037', you should handle this
also you might've stored IDs as integers so it can't retrieve from '815358648225366037' as its a string
Dyno uses a database for that no?
at least they should be now, if they aren't shame on them
I think so too, lol
like even in my bot i use a database for all infractions, including mutes
idk but i had to unmute manually π€·ββοΈ
jokes on you, it uses the much superior JSON
stop
LMAO
you can always use ohnodb (ahem @vocal plover)
What is that 
what's that

Ikr lmao
oh it's alec's
hmmm
the whole code is just 177 lines
uses in production
π
Nononononononono
No
Pls no
ohnodb?
There is Alec
If I catch anyone here seriously use that you will be executed by firing squad
hm
Remember: itβs so bad, but so well optimized
!pypi ohnodb
ty
I'll publish V2 soon
Make it like import antigravity where it does some dumb stuff on import?
Oops, runs away πββοΈ
Ngl the import antigravity is in my opinion the best Easter egg in python
is ohnodb, yours? and is it NOSQL database? I will start using it
BTW I can use an async function in run_until_complete, right?
I see, yes it is
bruh i fixed it already
guys, how do i create a role on nextcord?
!d discord.Guild.create_role
await create_role(*, name=..., permissions=..., color=..., colour=..., hoist=..., mentionable=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") for the guild.
All fields are optional.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to do this.
Changed in version 1.6: Can now pass `int` to `colour` keyword-only parameter.
You don't. You use disnake because it's better. 
Winks to @maiden fable
π
ummmmmmmmmmmmmmmmmmmmmm how is disnake better?
Because it is.
ok lemme check the docs
@vocal plover I might just move to ohnodb
How to run an async function with an AbstractEventLoop 
without awaiting it in my code ^^^
Can I do a print statement joke?
No
Ok I'm sorry.
Ohnodb > postgres π€«
I have been working on this since the last 2 hours I ain't in a joking mood rn
be lazy, use asyncio.run to let it make an event loop for you
I have done it, but now I want to make it so that it runs a coro when the instance of the class is made :c
oh you want to run an async function upon init?
use async definded classmethod?
and?
Did that one discord.py library go out of existence like the developer said it was going to
Where will I run it?
discord.py is staying
just no more updates
before it breaks we'll be in march 2022
what are people moving to? or is it being forked
Whether guild and direct message related events are enabled.
This is a shortcut to set or get both guild_messages and dm_messages.
This corresponds to the following events...
it will break if people don't switch to slash commands though?
i'm currently working on a new library together with a few others, still massively WIP
dpy forks like disnake
or custom libs like disthon and stuff
yea saw it. At least it has a cleaner code and a better source code where u define events
discord.py doesn't have slash commands, and in 2022 discord will make message content a privileged intent. Due to the fact danny no longer will be making updates this intent will cause the library to actually break
disthon isn't a fork
Mb lemme edit it
it's made from scratch
There
thanks :D
but yeah because we rewrite it will be a lot longer before we got it fully up and running, where forks could almost instantly spring into action
Mhm
yes an async classmethod would be the cleanest
copying a SO example
import asyncio
dsn = "..."
class Foo(object):
@classmethod
async def create(cls, settings):
self = Foo()
self.settings = settings
self.pool = await create_pool(dsn)
return self
async def main(settings):
settings = "..."
foo = await Foo.create(settings)
Oh hmm
async def mute(ctx, user : discord.Member, duration = 0,*,unit = None):``` Anyway to make this work with `.mute @Someone#0171 10s`?
you need to catch it as a string, and run regex on it
i have a regex set if you want, I don't mind others using it
Yes, please!
it is sad that danny quit at a bit of an "annoying" time, due to the fact that discord is soon going to enforce slash commands to bigger bots, meaning libraries have little time to take over.
Although finally having a huge change in the library market is also a good sthing
Thank you so much!
It can be good thing, a lot of new developers (most of them using the existing code). Cons atm is that most of them suck (the libs)
i did take a bit of inspiration from dpy for how to do it, but we've chosen to make the @event decorator ALWAYS be a listener so you don't have that on_message mess with commands that dpy has
how to detect if a webhook is created
Mhm
!d discord.on_webhook_create
No documentation found for the requested symbol.
Breh
will there be big syntax changes?
One last question- how can I convert this to a non-cog? py async def tempmute(self, ctx, member: typing.Union[discord.Member, discord.User, discord.Object], time, *, reason=None):
!d discord.on_webhooks_update
discord.on_webhooks_update(channel)```
Called whenever a webhook is created, modified, or removed from a guild channel.
This requires [`Intents.webhooks`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.webhooks "discord.Intents.webhooks") to be enabled.
ah yea
I don't know much about cogs :P
that s
ok thanks
there will be some changes, but also a lot of similarities
remove self
that's good
change the decorator and remove self (assuming you don't subclass)
DUDE PYTHON HAVING A STROKE
await hunai.__ai_session.update_channel_cache()
AttributeError: 'HunAI' object has no attribute '__ai_session'
but
class HunAI(Client):
def __init__(self, session: ClientSession):
super().__init__(session, TOKEN) # type: ignore
self.loop = get_running_loop()
self.__ai_session = AIRequest(self)
π
is this part of your AI bot?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: type object 'datetime.datetime'
has no attribute 'timedelta'``` ```py
@client.command()
async def tempmute(ctx, member: typing.Union[discord.Member, discord.User, discord.Object], time, *, reason=None):
await ctx.message.delete()
if isinstance(member, discord.Member):
if member.top_role >= ctx.author.top_role:
await ctx.send("You cannot mute this person")
return
else:
member = member if isinstance(member, discord.User) else await ctx.bot.fetch_user(member.id)
if not member:
raise commands.BadArgument("User was not found")
weeks = int((re.findall(r"(\d+)w", time) or "0")[0])
days = int((re.findall(r"(\d+)d", time) or "0")[0])
hours = int((re.findall(r"(\d+)h", time) or "0")[0])
minutes = int((re.findall(r"(\d+)m", time) or "0")[0])
timedelta = datetime.timedelta(
weeks=weeks,
days=days,
hours=hours,
minutes=minutes
)
endtime = datetime.datetime.utcnow() + timedelta
embed = discord.Embed(title=f'You have been temporary muted from {ctx.guild.name}. You have been muted until {endtime}.',
color=discord.Color.green())
if reason:
embed.add_field(name='Reason:', value=f'{reason}', inline=False)
embed.add_field(name='If you have questions:', value=f'If you have questions about this action, or would like '
f'to appeal it. Please contact the staff team. '
f'You were muted by {ctx.author.mention}', inline=False)
try:
await member.send(embed=embed)
except discord.Forbidden:
await ctx.send('Could not send DM to user')
muterole = ctx.guild.get_role(872910398209282078)
await member.add_roles(muterole)
async with ctx.bot.pool.acquire() as con:
try:
result = await con.fetchrow("INSERT INTO tempmutes(uid, executor, timedate, endtime, reason) VALUES($1, $2, "
"CURRENT_TIMESTAMP(1), $3, $4) RETURNING muteid", member.id, ctx.author.id, endtime, reason)
muteid = result[0]
except Exception as error:
print(error)
embed = discord.Embed(title=f' ', description=f' ',
color=discord.Color.green())
embed.set_footer(
text=f'Action performed by {ctx.author} | Case {muteid}')
embed.set_author(name=f'Case {muteid} | Temp mute | {member}')
embed.add_field(name='End time', value=f'{endtime}', inline=False)
if reason:
embed.add_field(name=f'Reason', value=f'{reason}', inline=False)
await ctx.send(embed=embed)
await ctx.bot.logchannel.send(embed=embed) ``` @valid niche
you imports are different
import discord
import random
import json
import os
import datetime
import asyncio
import traceback
import sys
import re
import pytz
import aiosqlite
import typing
from discord.ext.commands import has_permissions, MissingPermissions
from datetime import datetime
from discord.ext import commands
from discord.ext import tasks
from discord.ext.commands.errors import BadArgument```
Possibly :P
mhm
i just import datetime, you did from datetime import datetime
is your chat AI bot like a actually trained AI
Ah
since you need a timedelta here
nah hardcoded convos
make it to actual AI π
due to the __ it's seen as a hidden attribute
and you need to access it differently
never knew that existed in Python
since it shows in the typehint list
it's defined by the __
Yea ik but before in 3.9 it used to work π€£
if you do
class foo:
def __init__(self):
self.__hidden = "a"
bar = foo()
print(bar._foo__hidden)
``` you can access it
ooh
no it never worked
thanks
and never should like the way you did
bet
He broke the Python
Lmao
the AI is too powerful
True
also frick i broke disthon
lmao
lol
Anyone know the behaviour to make a bot paste the hyperlink and then also paste out the preview embed that would normally happen for when users paste links. For example posting a link to a tweet, shows you what the tweet says - but when my bot posts the same link, no embed with what the tweet says is posted.
probably the bot doesnβt have embed permissions
I've given it admin privs in my server.
does the discord have good API docs?
yes
especially for python, because in the few examples they give it's all in python
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
I never ever realized I can scroll down the page
oh boi
I literally though the intro was only thing ;-;
there's a LOT to the docs
what
the documents are huge
"oh there is a sidebar, must be useless"
π€£
how
π
thatβs not it, even if you didnβt see the scrollbar there is more content
there is not a lot of it in the intro section
you can see more stuff in the sidebar?
I hate myself
you donβt have to scroll
this, yes. But not what I wanted to see
TypeError: 'EmbedProxy' object is not callable?
donβt call it
I do hate myself, how can I miss such a thing
well, now that I found them π . I can start asking a lot of annoying questions
π€£
.bm If I ever feel I success at something. Just a nice little reminder of how dumb I'm
luckily there is unbm feature (possibly) up coming
?tag IR
This is not a Modmail thread.
LMAO
what?
just a quick Q, trying to install the pip install -u
is there a way of going about that herE?
!rewrite
?rewrite

So I think I need some basic Python help :c
#βο½how-to-get-help for that
i'm not getting what you're saying.. u trying to upgrade pip or ..?
Ask away, I can't help but do it anyways
yeah, trying to install the whole thing
:c booli (jk ofc)
eh u will be able to
no I don't think so
just installing the latest version of pip
i said, u r trying to upgrade pip? install pip? or what?
aah ok ok
yes, that
pip install -U pip
if pip is already installed
elif ai_cnl:
channel: TextChannel
for cnl in msg.server.channels: # type: ignore
cnl: Union[VoiceChannel, TextChannel]
if cnl.id in self.ai_channels:
channel = msg.server.get_channel(cnl.id) # type: ignore
break
else:
continue
if channel: # type: ignore
channel referenced before assignment (don't ask about the lib)
Oops
wrong mention
@tawdry perch ^^^
and if it isn't...
sorry trix
what about it?
???
nothing
you guys type hint mid function?
Anyways I'mma open a help channel
is the channel supposed to be a param?
open a help channel & ping me there
sure thing. ill try and do that now
your quesiton is not related to bot development


