#discord-bots

1 messages · Page 647 of 1

upbeat otter
#

the easiest thing I do is use carl lmao

tawdry perch
#

I kind of like writing simple documentation

maiden fable
#

Mind designing a GUI for me 🥺

maiden fable
tough lance
tawdry perch
#

I prefer making really random commands that are useless and works 50% of time

slate swan
#

thank you

upbeat otter
maiden fable
slate swan
upbeat otter
maiden fable
#

saw that

upbeat otter
#

my bad habit

maiden fable
#

Lmao idrc tbh

tough lance
maiden fable
tough lance
#

Ya I'll take a screenshot

maiden fable
tough lance
#

I'm going to watch youtube

#

Bye

slate swan
#

how do I get the bot to disable the button after clicking?
code:

@bot.command()
async def test(ctx):    
    embed = discord.Embed(title = 'ticked blyat')
    await ctx.send(embed=embed, components = [
      Button(style = ButtonStyle.green, label = 'Create Ticket')])

    responce = await bot.wait_for('button_click')

    if responce.component.label == 'Create Ticket':
      await responce.respond(content = 'gay')
velvet tinsel
#

Which module is thus

#

It looks like disnake

slate swan
#

probably that shitty library called "discord_components" bet

velvet tinsel
slate swan
velvet tinsel
#

It is

#

I remember seeing a tutorial like that

#

I was asking for disnake

tough lance
#

Disnake has views

velvet tinsel
#

😭 they gave me that

slate swan
#

😭

#

I tried it like this but it gives an error await responce.respond(content = 'gay',disabled = True)

velvet tinsel
#

Do you like ducks?

slate swan
#

yes they're cute

tough lance
#

Ye

velvet tinsel
#

What about cats

tough lance
#

They're tasty

slate swan
velvet tinsel
slate swan
#

idk if anybody online rn has ever bothered with that bad lib

velvet tinsel
#

Hold up

slate swan
velvet tinsel
#

Why is your pfp so

slate swan
velvet tinsel
#

Weird

slate swan
#

whose

velvet tinsel
#

Yours

slate swan
#

oh

velvet tinsel
#

I can’t really say much tbh mines weirder

slate swan
#

because :kek:

sage otter
#

I mean that’s a pretty normal thing nowadays

velvet tinsel
#

:kek:

slate swan
#

:kek: 😌

velvet tinsel
slate swan
velvet tinsel
#

Not having nitro :sadge:

slate swan
#

ikr :kek:

velvet tinsel
tough lance
#

Yep just a random person

velvet tinsel
#

We are very creative with our names

#

“DownloadPython”

slate swan
#

well you weren't here at that time

#

¯_(ツ)_/¯

upbeat otter
unkempt canyonBOT
upbeat otter
stiff nexus
#

This is in on_command_error py if owner: return await ctx.reinvoke() This is in on_command

if ctx.author.id == owner.id:
    ctx.command.reset_cooldown(ctx)  
```which one is better way to use?
stiff nexus
sick birch
#

pretty sure there's an is_owner() function

sage otter
#

it’s a cool down reset

stiff nexus
slate swan
sage otter
#

Not command check

stiff nexus
#

ik

sick birch
sage otter
#

does re-invoke bypass cooldowns?

slate swan
#

yes

#

it bypasses all checks

sage otter
#

I mean then what’s the problem then. Just use any of them oogh

slate swan
#

yeah

kindred drum
#

how do I sort through a dictionaries keys exclusively

velvet tinsel
#

Back

#

Hi jam_cavedude

slate swan
#

Sup, how to put commands into a specific category (for help command)?

#

Like there is no category

#

But I also want other categories

brazen raft
#

You can subclass HelpCommand

#

And use that as your default help command

dire folio
#

How do you send embeds to a user's dms

lament mesa
#

!d discord.User.send

unkempt canyonBOT
#

await send(content=None, *, tts=None, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, mention_author=None, view=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Sends a message to the destination with the content given.

The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.

To upload a single file, the `file` parameter should be used with a single [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.File") objects. **Specifying both parameters will lead to an exception**.

To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
lament mesa
#

there is a embed parameter

unkempt canyonBOT
#

Hey @shut axle!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

shut axle
#

!code-blocks

unkempt canyonBOT
#

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.

slate swan
#

how to make a bot copy the author's message and send it?

upbeat otter
slate swan
#

in command

upbeat otter
lethal bloom
#
@bot.event
async def on_member_remove(member):
    channel = await bot.fetch_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

the invitation that is generated is not where the user came from :(
help me

What I want with this is: Make a "log" that shows from which server the user left.

lethal bloom
# upbeat otter Just use member.guild
@bot.event                    🔽
async def on_member_remove(member):
    channel = await bot.fetch_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

?

upbeat otter
#

What does this send?

lethal bloom
slate swan
# lethal bloom ```py @bot.event 🔽 async def on_member_remove(member): c...
@bot.event
async def on_member_remove(member):
    channel = bot.get_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

try

lethal bloom
#

right now send another server and that is where the messages are arriving

slate swan
#

help? ```py
@bot.command(aliases = [])
@commands.cooldown(1, 4, commands.BucketType.user)
async def emb(ctx):
channel = bot.get_channel(916008167698210849)
def check(m): return m.author == ctx.author and m.channel == ctx.channel
msg = await bot.wait_for('message', check=check, timeout=None)

embed=discord.Embed(color=0x2e2f33)
embed.add_field(name=f"Заказ {ctx.author}", value=f"{msg}", inline=False)
await channel.send(embed=embed)

lethal bloom
#

?

slate swan
lament mesa
#

maybe you want the content of the message?

slate swan
#

yes

lament mesa
#

then message.content

slate swan
quaint epoch
#

oh nvm it was fixed

upbeat otter
modern fiber
quaint epoch
#

How do i get the message content?

#

because i tried ctx.content but it didn't work

lethal bloom
#
@bot.event
async def on_member_remove(member):
    channel = await bot.fetch_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

the invitation that is generated is not where the user came from :(
help me

What I want with this is: Make a "log" that shows from which server the user left.

upbeat otter
quaint epoch
real talon
#

Hello, how can we add a role to a member? (via the role identifier) plzz

slate swan
quaint epoch
#

thanks

slate swan
unkempt canyonBOT
#

await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s.

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, and the added [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s must appear lower in the list of roles than the highest role of the member.
slate swan
#

!d discord.Guild.get_role

unkempt canyonBOT
real talon
#

do you have an example?

#
await add_roles(get_role(role_id), reason=None, atomic=True)```
#

?

lethal bloom
#

lol

real talon
#

;-;

slate swan
lethal bloom
# real talon ;-;

Here they do not explain, they just put a command and guess how it gets ;-;

real talon
#

bruh ;-;

sullen shoal
#

we explain when they atleast try to do something by themself

real talon
#

ok sorry ;-;

manic wing
unkempt canyonBOT
#

class discord.Role```
Represents a Discord role in a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild")...
manic wing
#

the cool thing with discord.py is when you “crack the code” per se, you can start to figure everything out for yourself

#

we’re here to push you in the right direction, and guide you on how to learn byyourself

lethal bloom
#
await add_roles(get_role(806322592738574357))
tawdry perch
manic wing
#

the ability to learn by yourself is exponentially more important than any knowledge you have

upbeat otter
slate swan
#

someone help? ```py
@bot.command(aliases = [])
@commands.cooldown(1, 4, commands.BucketType.user)
async def emb(ctx):
channel = bot.get_channel(916043553946341406)
def check(m): return m.author == ctx.author and m.channel == ctx.channel
msg = await bot.wait_for('message', check=check, timeout=None)

emoji = [":thumbsup:"]

embed=discord.Embed(color=0x2e2f33)
embed.add_field(name=f"Заказ {ctx.author}", value=f"{msg.content}", inline=False)
await channel.send(embed=embed)
await embed.add_reaction(emoji)

manic wing
sullen shoal
tawdry perch
manic wing
slate swan
upbeat otter
slate swan
#

how do I get the bot to add a reaction to my message

tawdry perch
manic wing
unkempt canyonBOT
#

class discord.Message```
Represents a message from Discord.

x == y Checks if two messages are equal.

x != y Checks if two messages are not equal.

hash(x) Returns the message’s hash.
tawdry perch
#

oh.. to yours?

manic wing
quaint epoch
#

It says that ctx.message.author has no attribute message

#

when i wanted to just verify if the author is allowed to purge

#

but it says that Message object has no attr message

#

even when i didn't call it

#

i only called ctx.message.author

#

so what should i do?

sage otter
#

instead of more effort.

#

Consider just using has_permissions()

quaint epoch
#

okay :|

manic wing
unkempt canyonBOT
#

discord.on_ready()```
Called when the client is done preparing the data received from Discord. Usually after login is successful and the [`Client.guilds`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client.guilds "discord.Client.guilds") and co. are filled up.

Warning

This function is not guaranteed to be the first event called. Likewise, this function is **not** guaranteed to only be called once. This library implements reconnection logic and thus will end up calling this event whenever a RESUME request fails.
manic wing
quaint epoch
sage otter
#

I honestly didn’t read the full. thing

#

I just looked at what he circled AMshrug

#

But what I said is still valid. In regards to his purge command.

quaint epoch
sage otter
#

The root of the error no.

lethal bloom
#

@quaint epoch
clear command?

manic wing
slate swan
quaint epoch
manic wing
lethal bloom
#

ok

manic wing
#

please read the error. I have told you precisely what to do.

upbeat otter
lethal bloom
# quaint epoch yes

example:

@client.command(aliases= ['purge','delete'])
@commands.has_permissions(manage_messages=True)
async def clear(ctx, amount : int):
   if amount == None:
       await ctx.channel.purge(limit=1000000)
   else:
       await ctx.channel.purge(limit=amount)
manic wing
#

you have explained nothing, and you havent even read the error yourself

tawdry perch
#

Spoonfeeding != learning

upbeat otter
lethal bloom
#

AE

velvet tinsel
tawdry perch
#

oop

velvet tinsel
#
spoonfeeding != learning
#

not spoonfeeding != not learning, that would not make sense

tawdry perch
#

My bad

velvet tinsel
#

it's ok

#

we all make mistakes sometimes

#

well, some of us don't

manic wing
upbeat otter
tawdry perch
#

anyways, I will got to sleep so enjoy your time here 👋

velvet tinsel
slate swan
upbeat otter
velvet tinsel
manic wing
upbeat otter
velvet tinsel
manic wing
#

i would love this channel so much if people werent so dependant and ignorant

tawdry perch
velvet tinsel
#

||I shall not mention their names||

upbeat otter
velvet tinsel
#

and now I hate spoonfeeding

tawdry perch
#

Receiving spoonfeed when I don't even want it is the worst

manic wing
#

i spoonfeed to people who dont know python because they dont care about learning, they just want the answers

slate swan
manic wing
tawdry perch
velvet tinsel
#

I find breaking stuff down into logic helps everything a lot

#

whenever someone spoonfeeds me I just try to ignore that comment

velvet tinsel
manic wing
tawdry perch
#

sometimes.. anyways now I will go to sleep 😫

velvet tinsel
slate swan
# tawdry perch may you explain how it does not + what did you try

code: ```py
@bot.command(aliases = [])
@commands.cooldown(1, 4, commands.BucketType.user)
async def emb(ctx):
channel = bot.get_channel(916043553946341406)
def check(m): return m.author == ctx.author and m.channel == ctx.channel
msg = await bot.wait_for('message', check=check, timeout=None)

emoji = ["👍"]

embed=discord.Embed(color=0x2e2f33)
embed.add_field(name=f"Заказ {ctx.author}", value=f"{msg.content}", inline=False)
await channel.send(embed=embed)
await message.add_reactions(emoji)

error: 
```py
Bot successfully connected
Ignoring exception in command emb:
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "D:\прочее\Роботы Программирование\python\папка для заказа бота\main.py", line 44, in emb
    await message.add_reactions(emoji)
NameError: name 'message' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'message' is not defined
tawdry perch
#

bye 👋

manic wing
manic wing
#

but well done on adding the actual emoji

quaint epoch
manic wing
#

jesus fuck

quaint epoch
#

and what info do i need to find on the docs for discord.py

velvet tinsel
#

what are the usages of tuples again?
I do not comprehend
in real word situations

manic wing
#

you dont even need the docs for that

upbeat otter
manic wing
#

but yeah, they are in no way essential for python

#

they're used a lot, however

lament depotBOT
#
In the future, don't do that.

@velvet tinsel, please enable your DMs to receive the bookmark.

manic wing
#

ill go to a random file in discord.py source code

#

and tell you the usage of the first tuple i find

velvet tinsel
#

OK

manic wing
#

again, py __slots__ = ( '_roles', 'joined_at', 'premium_since', 'activities', 'guild', 'pending', 'nick', '_client_status', '_user', '_state', '_avatar', ) these slots will not be changed nor edited through the code, so they are tuples

#

anything official thats not being changed goes in a tuple

velvet tinsel
#

Ok

lethal bloom
#

@quaint epoch

velvet tinsel
#

oh no ping ;-;

slate swan
#

How do I view Unicode emoji?

quaint epoch
velvet tinsel
slate swan
#

someone help?```py
@bot.command(aliases = [])
@commands.cooldown(1, 4, commands.BucketType.user)
async def emb(ctx):
channel = bot.get_channel(916043553946341406)
def check(m): return m.author == ctx.author and m.channel == ctx.channel
msg = await bot.wait_for('message', check=check, timeout=None)

emoji = [":white_check_mark:"]

embed=discord.Embed(color=0x2e2f33)
embed.add_field(name=f"Заказ {ctx.author}", value=f"{msg.content}", inline=False)
message = await channel.send(embed=embed)
await message.add_reactions(emoji)

error: ```py
Bot successfully connected
Ignoring exception in command emb:
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "D:\прочее\Роботы Программирование\python\папка для заказа бота\main.py", line 44, in emb
    await message.add_reactions(emoji)
AttributeError: 'ComponentMessage' object has no attribute 'add_reactions'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'ComponentMessage' object has no attribute 'add_reactions'
velvet tinsel
#

Bye 👋

slate swan
#

If yes then I bet that shitty lib is the problem

slate swan
#

Np 👍

dire folio
#

In an embed field how can I make the value empty

slate swan
#

Give it an invisible char

#

\u2800

manic wing
#

\u200b

#

mines better 😡

slate swan
#

They're basically the same 😡

#

Anyone got a role info command ?
or idea on what it should contain

radiant horizon
#

like a command that checks what roles a user has?

slate swan
radiant horizon
#

ok

slate swan
#

i know how to code it, but i don't know what other info it shall have

radiant horizon
#

im not sure then

kindred drum
#

yo anyone know a quick fix?

#
@bot.command()
async def rep(ctx):
    global repNumber

    if len(repNumber) == 0:
        await ctx.send(f"{ctx.message.author.mention} Your reputation will now be **automatically** counted")
        repNumber[ctx.message.author.id] = 1
        print(repNumber)
        print (len(repNumber))
    else:
        if ctx.message.author.id in repNumber.keys():
            repNumber[ctx.message.author.id] = repNumber[ctx.message.author.id] + 1
            await ctx.send(f"You have received **1** reputation!")
            print("This user has already registered")
            print(repNumber)
            if repNumber[ctx.message.author.id] == 10:
                roleID = 916065992214450177
                roleObj = ctx.guild.get_role(roleID)
                await ctx.send(f"{ctx.message.author.mention} has reached **10** reputative points and has had the **10+ reputation** role applied!")
                await ctx.add_roles(roleObj)
        else:
            await ctx.send(f"{ctx.message.author.mention} Your reputation will now be **automatically** counted")
            repNumber[ctx.message.author.id] = 1
            
    

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'add_roles

manic wing
unkempt canyonBOT
#

class discord.Member```
Represents a Discord member to a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").

This implements a lot of the functionality of [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User").

x == y Checks if two members are equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

x != y Checks if two members are not equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

hash(x) Returns the member’s hash.

str(x) Returns the member’s name with the discriminator.
manic wing
#

everything.

slate swan
#

why my code not work?

@bot.event
async def on_reaction_add(reaction, user):
    if reaction.message.author.bot:
      if reaction.emoji == '✅':
        return
    if reaction.message.author.user:
      if reaction.emoji == '✅':
        channel = bot.get_channel(916043553946341406)
        await channel.send("hello")
manic wing
#

there should never be a reason you might need it. if there is a variable you want, add it to bot. bot.repNumber = 0

kindred drum
velvet tinsel
#

but I use global

manic wing
#

that doesn't make it good

velvet tinsel
#

oh
it works sometimes

manic wing
#

you should never ever use global in a discord bot.

velvet tinsel
#

why?

manic wing
#

global is literally satan

velvet tinsel
#

oh

#

that's why my code is all spaghetti

manic wing
#

when you start to use global too much, you fuck up all your code

velvet tinsel
#

;-;

#

ok
I will stop the drug addiction

manic wing
#

there shouldn't even be a reason why you need global - if you want a global variable, assign it to bot

manic wing
#
import discord
from discord.ext import commands

bot = commands.Bot(...)
bot.special_number = 1

@bot.command()
async def count(ctx:discord.Context):
  bot.special_number += 1

sick birch
velvet tinsel
#

damn I have millions of bookmarks

slate swan
#

How can i see how many users have a specific role ?
I want to see how many people with the Member role are in a server

manic wing
unkempt canyonBOT
sick birch
#

especially in discord bots since you always have access to the bot instance

velvet tinsel
#

ok
I will stop using the satanic language

manic wing
velvet tinsel
#

I was about to put a dungeons and dragons reference but then I realized Hunter may be watching 👀
screw it I'm gonna put it in: You don't remember something, and you're a tiefling you'll have to speak infernal

#

is it cheating if I make a code to solve my maths problem?

dire folio
#

when i try to set the value of a field in an embed to a response to a previous question and then send the embed again i get this:

<Message id=916067270571204658 channel=<DMChannel id=916035082958012497 recipient=<User id=485442448244342786 name='Lord Cringey' discriminator='2468' bot=False>> type=<MessageType.default: 0> author=<User id=485442448244342786 name='Lord Cringey' discriminator='2468' bot=False> flags=<MessageFlags value=0>>

and not what my respone was

#

heres the code:

    channel = await ctx.author.create_dm()
    if arole == 'hoster':
        emb = discord.Embed(title=f'Hoster Application: {user}', description='Please answer the question(s) below.', inline=True)
        emb.add_field(name=qlisthoster[0], value="(Enter your answer below.)")
        await channel.send(embed=emb)
        try:
            r1 = await client.wait_for('message', check=check, timeout=600)

        except asyncio.TimeoutError: #captures the error
            await ctx.send('Oh no! You did not respond in time')
            raise ValueError("Cancelled command")
        
        emb2 = discord.Embed(title=f'Hoster Application: {user}', description='Please answer the question(s) below.', inline=True)
        emb2.add_field(name=qlisthoster[0], value=f'{r1}')
        emb2.add_field(name=qlisthoster[1], value="(Enter your answer below.)")
        await channel.send(embed=emb2)
slate swan
# manic wing !d discord.Role.members

I did this ```py
embed.add_field(name="Members:", value=role.members)

and i got this ```
[<Member id=912426923911684157 name='Νέο' discriminator='0908' bot=True nick=None guild=<Guild id=912429025086021663 name='Νέο Test Server' shard_id=0 chunked=True member_count=2>>, <Member id=545346711690936321 name='Mihai06' discriminator='9957' bot=False nick=None guild=<Guild id=912429025086021663 name='Νέο Test Server' shard_id=0 chunked=True member_count=2>>]

how can i ping the members instead ?

velvet tinsel
#

make a for loop to go through every member in the guild, then find a specific one and ping them

#

I think
;-; am I right caeden

manic wing
velvet tinsel
manic wing
#

!e py _list = [1, 'a', 'b', 2, 3] print([k for k in _list if isinstance(k, int)])

unkempt canyonBOT
#

@manic wing :white_check_mark: Your eval job has completed with return code 0.

[1, 2, 3]
slate swan
#

Was 'boutta say

velvet tinsel
slate swan
manic wing
#

you can just make a list comprehension to automatically make a list of mentions

manic wing
unkempt canyonBOT
#

class discord.Message```
Represents a message from Discord.

x == y Checks if two messages are equal.

x != y Checks if two messages are not equal.

hash(x) Returns the message’s hash.
manic wing
#

wait_for('message', ...) returns an instance of discord.Message

velvet tinsel
#

How do you technically "hack" discord bots to make them spew out nonsense code to have an idea of their code?

manic wing
#

what

velvet tinsel
#

like

<member=..., ..., ...>
manic wing
#

what

velvet tinsel
#

just wondering
In servers they say "don't hack discord bots"

manic wing
#

you cant see a discord bots code from discord

velvet tinsel
#

I have no idea what they're on about

manic wing
#

there is no way to hack a discord bot from discord

#

discord is super fucking secure

velvet tinsel
manic wing
#

the only time a bot would do something it shouldnt, is if the thing it shouldnt do was programmed inside of it

#

i dont know what you mean

velvet tinsel
#

"4. Do not use macros, hacks, etc. with the bots."

#

from a random server

manic wing
#

!pypi selenium

unkempt canyonBOT
manic wing
#

you can use selenium to macro discord bots

velvet tinsel
#

ok

manic wing
#

cough obviously I prefer not to say whether I have partaken in these frivolous acts

velvet tinsel
#

oh
no

manic wing
slate swan
manic wing
#

end of story

velvet tinsel
slate swan
#

How can i get the bot owner id ?

dire folio
manic wing
slate swan
slate swan
#

Didn't u say that a discord bot can't be hacked

velvet tinsel
slate swan
manic wing
#

!d discord.ext.commands.Bot.owner_id || assuming you passed owner_id

unkempt canyonBOT
manic wing
velvet tinsel
#

differnet ;-;

manic wing
slate swan
manic wing
#

cough i dont know what you guys are talking about

#

im clean

velvet tinsel
#

hmm...

#

own up Caeden

slate swan
#

Lmao

velvet tinsel
#

wait, does that mean that he'll macro my bot? Oh...damn

manic wing
#

no, its a thing of the past

velvet tinsel
#

I think I'll ban him from ever using my bot :P

#

no that he will cough

manic wing
#

also you guys are distracting me from my quantative chemistry

slate swan
velvet tinsel
slate swan
#

I'm pretty sure that's a thing

#

Hmm

#

could this be bc i'm on py-cord ? i don't think so but just saying

velvet tinsel
#

depress

slate swan
#

Right, it's only a disnake thing

slate swan
#

Use what caeden suggested

slate swan
pliant gulch
#

owner_id is set by default as well you won't need to pass it

#

And owner just doesn't exist

velvet tinsel
#

hi andy

pliant gulch
#

👋

slate swan
velvet tinsel
#

why do you have a dating server Kraots?

pliant gulch
slate swan
slate swan
#

🏃‍♂️

velvet tinsel
#

I;m gonna go ahead and join

slate swan
#

😳

velvet tinsel
#

f

slate swan
#

bot.owner_id returns None

#

Do you have intents

#

yea

#

Although i don't really see how that would really be an intents problem tbh

slate swan
#

It should work

velvet tinsel
#

im in

slate swan
#
intents.members = True

should i do .all() ?

#

I don't think it makes much of a difference

velvet tinsel
#

blyat

#

you just muted me Kraots

slate swan
#

And now banned you 🥰

velvet tinsel
#

and banned me

slate swan
#

See you in 8 months in there ig

velvet tinsel
#

I'll come back in 8 months

slate swan
#

😂

velvet tinsel
#

you're a mod?

slate swan
#

Owner

velvet tinsel
#

sweet

#

you're not on the owner list tho

slate swan
#

My bio clearly says "my dating server" 🥰

slate swan
velvet tinsel
slate swan
#

I like appearing as a normal member

velvet tinsel
#

ok

slate swan
#

That way trolls won't just stop because there's somebody with obvious perms there, just in case 😉

lethal bloom
#
@bot.event
async def on_member_remove(member):
    channel = await bot.fetch_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

the invitation that is generated is not where the user came from :(
help me

What I want with this is: Make a "log" that shows from which server the user left.

velvet tinsel
#

I thought you dated bots in that server

#

;-;

#

it would be way cooler

slate swan
slate swan
#

😭

velvet tinsel
pale turtle
slate swan
dire folio
#

how do i add the buttons to an embed?

slate swan
#

!d discord.ui.View

unkempt canyonBOT
#

class discord.ui.View(*, timeout=180.0)```
Represents a UI view.

This object must be inherited to create a UI within Discord.

New in version 2.0.
slate swan
dire folio
#

thx

velvet tinsel
#

I mean you can just use disnake
I need to join the server

lethal bloom
# slate swan Then??

I just need you not to send me an invitation from the channel where I want it to arrive

manic wing
#

: ()

slate swan
slate swan
velvet tinsel
#

I am as well

manic wing
#

L

slate swan
velvet tinsel
#

I need to code my girlfriend

#

;-;

slate swan
#

I made a gf bot😤 💪

#

💀

slate swan
velvet tinsel
#

or maybe I can just use wait I'm not gay

slate swan
#

Imma go make an AI from scratch and have it be my little kinky gf 🚶‍♂️

velvet tinsel
#

ok

slate swan
#

No because I'm not gonna do that

slate swan
#

I haven't reached such a sorry state of myself yet

manic wing
#

are you sure

slate swan
#

Yes

lethal bloom
slate swan
slate swan
slate swan
velvet tinsel
#

but

slate swan
velvet tinsel
#

I don't like girlfriends

slate swan
#

:kek: ftw

velvet tinsel
#

they're annoying af

slate swan
#

No you just had the wrong ones

velvet tinsel
#

I never had one

slate swan
velvet tinsel
#

but I never really had one

slate swan
slate swan
slate swan
velvet tinsel
slate swan
velvet tinsel
slate swan
#

I had a gf

lethal bloom
slate swan
#

We broke up after a year 😔 :kek:

#

And the gf is the float because ints go in floats

velvet tinsel
sick birch
slate swan
velvet tinsel
lethal bloom
slate swan
#

😔 :kek:

sick birch
slate swan
#

getch() uses get and then fetch right?

#

Yes

#

But that alias is only in disnake

slate swan
#

Obviously

slate swan
slate swan
lethal bloom
# sick birch `member.guild` would be the guild which the member left.
@bot.event                   
async def on_member_remove(member.guild):
    channel = await bot.fetch_channel(915953386631864340)
    if channel:
        invite = await channel.create_invite()
    
        await channel.send(f"・ Nombre del Server **{member.guild.name}** \n・ Server ID **{member.guild.id}** \n・ Usuario **{member.mention}** \n・ ID del usuario **{member.id}** \n・ Invitacion **{invite} **.")

?

slate swan
#

Bruh 💀

sick birch
#

I don't really understand what you're trying to send to the channel haha

slate swan
#

I'm not gonna bother this time, don't wanna get banned again 😌

velvet tinsel
#

I said to the owner "you cant hack bots"
now he's asking me to make one

slate swan
sick birch
velvet tinsel
lethal bloom
velvet tinsel
#

;-; he banned me

slate swan
sick birch
slate swan
slate swan
leaden jasper
#

Is it normal for hyperlinks in embeds to disappear if prefixed with !?

slate swan
sick birch
# lethal bloom oooh

what you can do is that you can get all the text channels of a guild, and get the first one

#

and generate an invite using that

#

that will give you the invitation to the guild a member just left

velvet tinsel
slate swan
velvet tinsel
#

I have a question

slate swan
#

Does this server log msgs😳

velvet tinsel
#

are you a girl Kraots?

slate swan
slate swan
slate swan
velvet tinsel
slate swan
#

😳

#

Lmao

#

😟

velvet tinsel
#

ok

#

well
never getting a girlfriend

#

anytime soon or anytime later

slate swan
#

Lmao

#

Get a boyfriend then

slate swan
slate swan
#

The server's for 14-19 only 😔

velvet tinsel
#

don't want one anyways 😦

#

💀

lethal bloom
slate swan
#

😦

slate swan
velvet tinsel
#

in 8 months

#

7 actually since it's december

slate swan
#

casually joins kraots server

#

:kek:

velvet tinsel
#

I'm coming as well

slate swan
#

Jk 😔

velvet tinsel
#

awww

#

I can't join ;-;

#

:kek:

slate swan
#

:kek:

#

No one likes me so thats why i talk to apis😔

velvet tinsel
#

:kek:

slate swan
#

Same 😔

#

They understand me😔

velvet tinsel
#

I talk to alexa

velvet tinsel
#

she never understands me

slate swan
sick birch
#

invites are tied to channels, not guilds

velvet tinsel
#

;-;

#

cap

sick birch
#

workaround, like i mentioned before, would be to get the first text channel and make an invite out of that

velvet tinsel
#

🧢

lethal bloom
#

ok

velvet tinsel
#

I have no friends

slate swan
slate swan
velvet tinsel
#

@slate swan create a friend server

sick birch
#

!ot

unkempt canyonBOT
slate swan
slate swan
#

why my code not work?

@bot.event
async def on_reaction_add(reaction, user):
    if reaction.message.author.bot:
      if reaction.emoji == '✅':
        return
    if reaction.message.author.user:
      if reaction.emoji == '✅':
        channel = bot.get_channel(916043553946341406)
        await channel.send("hello")
velvet tinsel
slate swan
velvet tinsel
#

create one

#

😠

slate swan
#

Or else :kek:

velvet tinsel
#

I need friends real bad

sick birch
velvet tinsel
#

he forgot a wait_for I think

slate swan
#

My life doesnt work 🥺 👉 👈

velvet tinsel
slate swan
slate swan
velvet tinsel
#

you forgot a wait_for() I think

sick birch
#

off top top of my head you're trying to get the user from a member which i'm not sure is possible

slate swan
velvet tinsel
#

then I'm creating one @slate swan

slate swan
#

Since even does a Member object have a .user attribute

sick birch
#

Yeah you can't get .user from .author @slate swan

velvet tinsel
#

ah, Bumpkin

slate swan
#

If you add hunter all hes gonna do is:
!ot

sick birch
#

also your code could be cleaned up a lot

slate swan
#

No offense btw

lethal bloom
#

Is there any way that when my bot starts instantly it sends a message to a specific channel?

slate swan
sick birch
manic wing
sick birch
manic wing
#

maybe he meant a wait_for instead of the event

sick birch
#

Have an async main() function which you call asyncio.run() on, and use bot.start() rather than bot.run()

slate swan
#

Then make a tasks.loop which only happens once

sick birch
#

bot.start() is a lower-level implementation of bot.run()

#

it's also non-blocking

#
async def main():
  bot = commands.Bot(...)
  await bot.start("TOKEN")
  await bot.get_channel(123456789).send("Bot is up!")
asyncio.run(main())
velvet tinsel
slate swan
#

why?

sick birch
#

Probably because you're using is to compare rather than ==

#

is and == work in different ways.

#

also what i gave you wasn't even python, it's just english. don't copy and paste and expect it to work

slate swan
#

. . .

sick birch
#

but what i gave you will almost definitely work better than what you have right now

slate swan
sick birch
#

I know

#

That's why I'm telling you to compare the values using ==, not checking the types using is

slate swan
#

What if i make a sub class in a sub class would my pc explode?

slate swan
#

Im impressjam_cavedude

pliant gulch
slate swan
velvet tinsel
#

what do you use to host it

manic wing
#

i made it like 6 months ago

manic wing
velvet tinsel
#

wow

#

ok

slate swan
#

😂

velvet tinsel
#

where do you buy it

dire folio
#

how do i check if someone reacted to a message

velvet tinsel
dire folio
#

thanks

velvet tinsel
#

;-; planning to buy one...

slate swan
#

Is good

velvet tinsel
#

ok

manic wing
#

what country do you live in

dire folio
velvet tinsel
velvet tinsel
#

supposing you did reaction = await bot.wait_for(...)

manic wing
velvet tinsel
#

what do I host on then

#

;-;

pliant gulch
#

Rent a VPS

slate swan
pliant gulch
#

Its way cheaper compared to buying a Pi

manic wing
#

ive got insane internet but the api is in fucking america

velvet tinsel
manic wing
velvet tinsel
#

which do you recommend?

pliant gulch
#

Yea, in the long run those electricity bills, wifi bills, and other stuff will add up

manic wing
#

idk

velvet tinsel
#

ok
i'll try AWS

manic wing
#

this

pliant gulch
#

I like Linode, used it for a bit

#

Also can recommend digital ocean which I used before lineode

manic wing
pliant gulch
#

GCP and AWS I don't really like due to how they bill, other then that its alright

velvet tinsel
#

.bm

manic wing
#

hm

#

!src src

unkempt canyonBOT
#
Command: source

Display information and a GitHub link to the source code of a command, tag, or cog.

Source Code
pliant gulch
#

Using the source command to source the source of the source command that fetches the sources of other commands

manic wing
#

indeed

velvet tinsel
#

ok

#

nice hosting

verbal cairn
#

Anyone know how to implement slash commands for a python bot

limpid thicket
slate swan
#

Best fork wirh slash commands

verbal cairn
#

Is it specifically for / commands?

final iron
#

No

boreal ravine
slate swan
#

No but has great slash commands

verbal cairn
lethal bloom
#

How do I get the name of a channel and its ID?

slate swan
verbal cairn
#

Ah

slate swan
#

All you have to do is change discord to disnake

verbal cairn
#

So import discord becomes import disnake

limpid thicket
boreal ravine
unkempt canyonBOT
boreal ravine
#

discord.Channel does not exist

slate swan
verbal cairn
#

Oh

limpid thicket
#

I changed it, you happy?

boreal ravine
verbal cairn
#

Is there like a library that shows what disnake has

slate swan
verbal cairn
#

Ah okay

boreal ravine
#

!d discord.abc.GuildChannel <= this is exactly like discord.Channel though

unkempt canyonBOT
#

class discord.abc.GuildChannel```
An ABC that details the common operations on a Discord guild channel.

The following implement this ABC...
slate swan
verbal cairn
#

Now the only thing I have to do is create a search filter for input which I have no clue how to

verbal cairn
slate swan
slate swan
verbal cairn
#

So like if u type / it will pop up with the interaction?

verbal cairn
#

Tysm u goat I’ve been tryna find this for like 3 days

verbal cairn
#

Tyty, I keep on giving up cuz I can’t create a good search filter for the items

verbal cairn
vast spindle
#
  if (message.channel.id == 'ID'):
    await message.reply("TEXT")```
the bot just does nothing
vast spindle
#

any message sent in that channel

quaint epoch
#

So I created a system for logging messages

#

But it logged this-

#

it didn't give me the date time

#

and yes i did py from datetime import datetime

vast spindle
#

kinda sad but will work

boreal ravine
#

call it using ()

quaint epoch
boreal ravine
#

!e

import datetime
print(datetime.datetime.now())
unkempt canyonBOT
#

@boreal ravine :white_check_mark: Your eval job has completed with return code 0.

2021-12-02 23:01:04.094437
boreal ravine
#

👌

quaint epoch
#

!e from datetine import datetime print(datetime.now)

#

darn okay

boreal ravine
#

datetime*

quaint epoch
#

!efrom datetime import datetime print(datetime.now())

#

So i made a logging system

#

but whenever i send a command now it doesn't work?

#

when i send a message now it logs it, but if it is a command id doesn't run it

#

When the async event runs does it stop the rest of them?

slate swan
unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

2021-12-02 23:14:01.820098
dire folio
#

will this work

        if send == 'send':
            submit = client.get_channel(763787880815919104)
            sentmsg = await submit.send(embed=final)
            await sentmsg.add_reaction('✅')
            await sentmsg.add_reaction('❎')
            try:
                reaction = await client.wait_for("reaction")
                if reaction == ':white_check_mark:':
                    await channel.send('Congrats you were accepted!')
                elif reaction == ':negative_squared_cross_mark:':
                    await submit.send('Give a reason.')
                    wait = await client.wait_for("message")
                    await channel.send(f'Unforturnately you were declined. This is the reason: {wait}')
            except:
                await submit.send('Smth went wrong')
                raise ValueError('Try did not work!')
        elif send == 'cancel':
            await channel.send("Ok did not send!")
            raise ValueError("Cancelled command")
verbal cairn
verbal cairn
#

client.process* not bot

quaint epoch
#

I'm really happy to have this server.

slate swan
final iron
#

I had no idea it saved from when I lost nitro

slate swan
dire folio
slate swan
#

And dont user bare excepts

dire folio
#

can i completely get rid of the except?

slate swan
dire folio
#

its the try part and after that makes it not work

summer flume
#

?

dire folio
#

pls @ me

sinful marsh
#

your bot is not processing commands as on_message blocks command processing

peak loom
#

Okay, someone explain how this is an EOL while scanning string literal?

#

Or do you mean as on join?

slate swan
# peak loom

the add_roles() takes a discord.Role
not a role name

peak loom
slate swan
#

also on_member_join doesnt have a ctx parameter

peak loom
somber musk
#

Guys you should try discord js bots it's easier in my opinion

slate swan
peak loom
slate swan
#

ig it could be fun to learn js

somber musk
slate swan
#

How to get the bot to take the message variable From the emb command to on_reaction_add?

peak loom
#

@slate swan

slate swan
peak loom
#

I answered your question.

slate swan
sick birch
sick birch
#

at the end of the day it's only preference and what matters is what you learn and if you're having fun

slate swan
#

How to get the bot to take the message variable From the emb command to on_reaction_add?

meager nova
#
keywords = ['hi',"sup","hello"]
if keywords in message.content:
  await message.channel.send("hello")

when I run this code i get an error that tells me that I need a string instead of a list in if keywords in message.content:. How can I fix this?

magic ore
#

!d any

unkempt canyonBOT
#
any

any(iterable)```
Return `True` if any element of the *iterable* is true. If the iterable is empty, return `False`. Equivalent to:

```py
def any(iterable):
    for element in iterable:
        if element:
            return True
    return False
slate swan
#

How to get the bot to take the message variable From the emb command to on_reaction_add?

meager nova
magic ore
#
>>> words = ['foo', 'bar']
>>> any([word in 'abcfoo' for word in words])
True```
meager nova
#

thanks!

unkempt canyonBOT
#

Hey @slate swan! I noticed you posted a seemingly valid Discord API token in your message and have removed your message. This means that your token has been compromised. Please change your token immediately at: https://discordapp.com/developers/applications/me

Feel free to re-post it with the token removed. If you believe this was a mistake, please let us know!

unkempt jewel
slate swan
#

just random question, i want to delete all messages in a channel, but when i try to get all messages in the channel, i get this error:

  for message in ticket_channel.history():
TypeError: 'HistoryIterator' object is not iterable
    for message in ticket_channel.history().flatten():
TypeError: 'coroutine' object is not iterable
```edited it to try fix
#

i dont get it

#

,banner

peak loom
#

How do I make a member on leave message in a specific channel?

slate swan
slate swan
#

how do I make my bot detect if a message contain xaxbxd keyword, where x is any number

quaint epoch
#

hmmmm, you might want to loop through a list with numbers 0-9, and replace all numbers in str(message.content) with x, then if it is = xaxbxd

gleaming vortex
#

how can i change the nickname of my discord bot whilst its running after x minutes

quaint epoch
gleaming vortex
quaint epoch
#

lemme see

gleaming vortex
slate swan
#

does anyone have a banner command i need some help

slate swan
quaint epoch
#

wait, what words?

slate swan
sick birch
#

You can split a string by spaces, that would get you all words

#

you can iterate over that

quaint epoch
#

lol i created a function that does that for my bot-py def spliceOutWords(string): try: str(string) except ValueError: return ',' cache = '' cacheList = [] for index, value in enumerate(string): if value == ' ': cacheList.append(cache) cache = '' else: cache = f'{cache}{value}' cacheList.append(cache) return cacheList

slate swan
#

Also I asked a question on stackoverflow but I didn't get an answer which could satisfy me. Can anyone give answer: https://stackoverflow.com/questions/70195718/how-to-parse-flags-and-value-in-a-string-to-a-dictionary-python

maiden fable
#

@slate swan didn't I tell u?

slate swan
maiden fable
#

Ah u did? Didn't know that, sorry

slate swan
#

\👍

slate swan
#
@bot.command()
async def banner(ctx, user: discord.User=None):
    await ctx.message.delete()
    if user == None:
        r = requests.get(f"https://discord.com/api/v9/users/{bot.user.id}", headers={"Authorization": "Bot " + TOKEN}).json()
        if r["banner"] == None:
            embed = discord.Embed(description=f"You don't have a banner.", color=0x2f3136)
            embed.set_author(name=f"{ctx.author} ({ctx.author.id})")
            await ctx.send(embed=embed)
        else:
            embed=discord.Embed(description=f"Here is, **your**'s banner.\n\n[png](https://cdn.discordapp.com/banners/{ctx.author.id}/{r['banner']}.png)\n[jpg](https://cdn.discordapp.com/banners/{ctx.author.id}/{r['banner']}.jpg)\n[gif](https://cdn.discordapp.com/banners/{ctx.author.id}/{r['banner']}.gif)\n",color=0x2f3136)
            embed.set_author(name=f"{ctx.author} ({ctx.author.id})", icon_url=str(ctx.author.avatar_url))
            embed.set_image(url=f"https://cdn.discordapp.com/banners/{ctx.author.id}/{r['banner']}.gif?size=4096")
            await ctx.send(embed=embed)```

says i have no banner even though i do
#

nvm.

sage otter
#

User.banner exists btw if you're using dpy 2.0

slate swan
#

on 1.7.3

#

is this possible? bot does not have the application role?

jade tartan
#

How do i make the bot mention on whos joined the server in the terminal?

vast gale
jade tartan
#

And how do i make autoroles to ppl when they join the server?

#

like have the bot give roles when members join

#

Hello

#

anyone

slate swan
upbeat otter
#

yeah?

slate swan
upbeat otter
upbeat otter
slate swan
upbeat otter
#

You can only change the perms of default role ig

slate swan
#

Just learned buttons pretty noice

upbeat otter
slate swan
upbeat otter
slate swan
jade tartan
# slate swan ```py print(member.name) ```
async def on_member_join(member):
        guild = client.get_guild(730651046459998218)
        channel = await client.fetch_channel(885464532959526913)
        description=(f"Welcome {member.mention}, You are member {guild.member_count}. \n Please enjoy your stay here and dont forget to read the await [#904279966693355550](/guild/267624335836053506/channel/904279966693355550/)"),
        role = guild.get_role(832120561848156180)
        await member.add_roles(role)
        await channel.send(f'Welcome to server **{member.mention}**.')```
jade tartan
# slate swan Your not sending anything

the last member send me this 2 codes
channel = await client.fetch_channel(885464532959526913)
await channel.send(f'Welcome to server **{member.mention}**.')

slate swan
jade tartan
#

await channel.send(f'Welcome to server **{member.mention}**.') This?

slate swan
#

You can just do:

channel = await client.fetch_channel(885464532959526913).send(f'Welcome to server **{member.mention}**.')
jade tartan
#
Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "c:\Users\thoma\Desktop\discord.py\python\bot.py", line 39, in on_member_join
    channel = await client.fetch_channel(885464532959526913).send(f'Welcome to server **{member.mention}**.')
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line -1, in fetch_channel
TypeError: can't send non-None value to a just-started coroutine```
slate swan
#

Weird give me a sec

jade tartan
#

k

sullen shoal
slate swan
#

😭

sullen shoal
jade tartan
#

just ping me when u figured it out plz

#

thanks

sullen shoal
#
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.') ```
#

at this point, you should just use the way you did

boreal ravine
#

or get the channel

jade tartan
#

didnt understand it

boreal ravine
jade tartan
sullen shoal
#

!pep8

unkempt canyonBOT
#

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:
PEP 8 document
Our PEP 8 song! :notes:

sullen shoal
#

indeed

slate swan
#

Cool tho

jade tartan
#

isnt working still

#

isnt showing on the terminal

slate swan
#

Show

jade tartan
#

nvm but when i do print(member.name) its only showing the members name. i want to be member.name has joined your server?

slate swan
boreal ravine
#

Bruh

slate swan
#

Hmm?

boreal ravine
#

Learn python, formatting strings are the easiest thing in python to do

#

🙂

slate swan
#

Yeahjam_cavedude

#

Used to use it

#

But now i dont lmao

#

Same

#

😭

tulip panther
#

Can someone help me out

#

My bots code just started having issues on its VPS and I havent added anything. It runs for a couple seconds then stops but returns this in logs.

#
/root/.pm2/logs/main-error.log last 15 lines:
0|main     |   File "/usr/local/lib/python3.8/dist-packages/pymongo/collection.py", line 29, in <module>
0|main     |     from pymongo import (common,
0|main     |   File "/usr/local/lib/python3.8/dist-packages/pymongo/common.py", line 27, in <module>
0|main     |     from pymongo.compression_support import (validate_compressors,
0|main     |   File "/usr/local/lib/python3.8/dist-packages/pymongo/compression_support.py", line 37, in <module>
0|main     |     from pymongo.monitoring import _SENSITIVE_COMMANDS
0|main     |   File "/usr/local/lib/python3.8/dist-packages/pymongo/monitoring.py", line 186, in <module>
0|main     |     from pymongo.helpers import _handle_exception
0|main     |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
0|main     |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
0|main     |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
0|main     |   File "<frozen importlib._bootstrap_external>", line 844, in exec_module
0|main     |   File "<frozen importlib._bootstrap_external>", line 939, in get_code
0|main     |   File "<frozen importlib._bootstrap_external>", line 1038, in get_data
0|main     | KeyboardInterrupt
sullen shoal
#

keyboard interrupt

#

happens when you hit ctrl + c

tawdry perch
#

You close it? Or pymongo does smth weird ig

sullen shoal
#

looks like the vps aint good

tawdry perch
#

Could be

tulip panther
#

digital ocean to be exact

#

it just started happening 2 hrs ago

sullen shoal
#

it could be also some timeout thing or smth, be sure to check the settings and stuff

lethal moat
#

how can i upgrade pip from 21.2.1 to 21.3.1 on my discord bot hosting?
I am getting these errors -
ERROR: Could not build wheels for multidict, yarl which use PEP 517 and cannot be installed directly
Failed building wheel for yarl
WARNING: You are using pip version 21.2.1; however, version 21.3.1 is available.
I have no idea what yarl or multiduct are

I have bought bot hosting from plox.host (pterodactyl python 3.9 server)

sullen shoal
#

show the entite traceback

tulip panther
#

kinda desperate rn. Alot of servers that use the bot are at risk rn since this issue is preventing the bot from running

sullen shoal
#

contact support maybe

lethal moat
#

yeah ik but i cant run it

#

every time i start the server the errors appear first and then the server just crashes

#

i will open a ticket at their support

shadow wraith
#

its also pterodactyl

#

and it's free

lethal moat
#

the reason i am using ploxhost is just because i have been using it for other purposes too for like the past year

#

so i trust their services

#

and its also affordable so