#discord-bots

1 messages · Page 783 of 1

vernal parrot
maiden fable
#

Happens with me too sometimes

keen talon
#

I completed a year in pydis today lemon_swag

keen talon
maiden fable
#

Cool!

#

#bot-commands

true moon
#

just a query it's usage will be dynamic_cooldown(message, type=BukketType.default) where the message will be actual message where i can access the user

final iron
#

I'm getting a disnake.errors.InteractionResponded: This interaction has already been responded to before

#

I looked on stack overflow and I need ctx.difer or smth

#

Is that correct?

valid galleon
#

can you make it so that an event triggers at a specific time, on a specific day? for example, if i want the bot to send a message at 1:00PM IST, every thursday, how can i do that?

final iron
#

I'm using bot.wait_for to get a response from a user

maiden fable
#

Mhm

maiden fable
#

No

final iron
maiden fable
#

Still

#

U can use inter.response only once

#

After that, u need to use inter.followup

#

For even editing the message

#

Discord Being Discord

final iron
#

Seriously? It works just fine for all of the rest of my shit

slate swan
#

async for...

maiden fable
#

Yups

#

Or archived = await self.get_channel(...).archived_threads().flatten() iirc

final iron
#

So if I can only use inter.response once why can I create a paginator with buttons just fine?

#

But it shows an error when I'm editing the message now

slate swan
#

what error?

final iron
#

disnake.errors.InteractionResponded: This interaction has already been responded to before

sonic flax
#
else:
        for alt in altjson['results']:
            embed = discord.Embed(title = "Dewier Bot", description = (f"(alt{'_id'})"), color = (0x0b0909))
            await ctx.send(embed = embed)```

How would I make it so it puts all the ids into 1 message like:
Dewier Bot
(_id)
(_id)
(_id)
slate swan
#

and the code?

true moon
#

never mind can some1 tell how to implement ur own cooldown?!

final iron
#

!paste

unkempt canyonBOT
#

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.

slate swan
final iron
#

@slate swan errors in the else statement when trying to edit the message

sonic flax
#
else:
        for alt in altjson['results']:
            embed = discord.Embed(title = "Dewier Bot", description = (f"(alt{'_id'})"), color = (0x0b0909))
            await ctx.send(embed = embed)```


How would I make it so it puts all the ids into 1 message like:
Dewier Bot
(_id)
(_id)
(_id)
final iron
#

Would editing the response really cause an error because thats how my pagination system with buttons works and it works fine without errors

slate swan
#

are you sure you get the error there?

final iron
#

Yes

#

Just added 2 print statements. 1 above it and 1 below it

#

The 1 above it prints but the one below doesn't

#

You know what, I'll go to bed and take another crack at it tmr

tardy plume
#

how can i get all playe's chat in my minecraft bedrock server to my discord server?

unkempt canyonBOT
#

discord.on_thread_update(before, after)```
Called whenever a thread is updated.

This requires [`Intents.guilds`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.guilds "discord.Intents.guilds") to be enabled.

New in version 2.0.
final iron
#

Do you have intents?

#

async def

sonic flax
#
else:
        for alt in altjson['results']:
            embed = discord.Embed(title = "Dewier Bot", description = (f"(alt{'_id'})"), color = (0x0b0909))
            await ctx.send(embed = embed)```



How would I make it so it puts all the ids into 1 message like:
Dewier Bot
(_id)
(_id)
(_id)
#

can someone help bru

final iron
#

Print your version

final iron
#

print(discord.__version__)

#

Are you using dpy or a fork

sonic flax
#

or what would i do instead

final iron
#

Hmm

#

Just try writing it anyway I guess

#

intelisense isn't everything

#

It gives me Unresolved attribute warnings for my bot variables

#

So its not always right

sonic flax
primal salmon
#

anyone here use buttons?

slate swan
#

needs to be an obj not an int

primal salmon
tardy plume
#

how can i run 2 .py file?

unkempt canyonBOT
#

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

Removes [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s from this member.

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 removed [`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.
maiden fable
#

U got an error handler?

#

Could be it is eating errors

final iron
#

^

#

Imo when you're in the heavy development stage of your bot you only want to handle the Command not found errors

primal salmon
#

🥲

maiden fable
#

code

#

Wait wait wait

#

Why u doing all this???

primal salmon
#

u know theres simple way than those

#

wait what are u trying to make?

maiden fable
#

Just do await before.owner.remove_roles(discord.Object(self.CLAIMED_THREAD_ROLE))

#

Ezzzzz

#

then disnake.Object

#

!d disnake.Object

unkempt canyonBOT
#

class disnake.Object(id)```
Represents a generic Discord object.

The purpose of this class is to allow you to create ‘miniature’ versions of data classes if you want to pass in just an ID. Most functions that take in a specific data class with an ID can also take in this class as a substitute instead. Note that even though this is the case, not all objects (if any) actually inherit from this class.

There are also some cases where some websocket events are received in [strange order](https://github.com/DisnakeDev/disnake/issues/21) and when such events happened you would receive this class rather than the actual data class. These cases are extremely rare.

x == y Checks if two objects are equal.

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

hash(x) Returns the object’s hash.
primal salmon
#

pithink how to use buttons in pydroid 3?/terminal

maiden fable
#

Weird

#

The role is lower than the bot's highest role, right?

#

Hmm yea

#

So it still prints the statement?

#

Weird...

#

Wait I have another idea

#

Just use self.get_guild(...).get_role(...) and print it

primal salmon
#

am I the only one using pydroid 3?

maiden fable
#

I guess?

#

So it does gets the role

#

And now, try setting this in a variable and then passing this in the remove roles

#

Do u have logging enabled?

#

Enable it

primal salmon
#

anyone know how to install button

maiden fable
vocal snow
maiden fable
#

It is a fork, so the basic things are same. Just replace discord with disnake

primal salmon
maiden fable
#

Hahaha its fine

#

Show

#

!paste

unkempt canyonBOT
#

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.

maiden fable
#

Wait

gritty nebula
#

@versed finch

#

@versed finch

maiden fable
#

try printing before.archived, after.archived. before.owner

maiden fable
gritty nebula
maiden fable
#

Could be its more of a discord UI issue that u still see the roles rather that yr code issue

maiden fable
gritty nebula
maiden fable
#

Mhm

slate swan
maiden fable
#

AHHHHHHHHHHHHHHH WHYYYY

oblique adder
#

What one reason to give discord to ask for presence intent which they couldnt say no ?

maiden fable
#

!d discord.Member.remove_roles

slate swan
#

whats the error?

unkempt canyonBOT
#

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

Removes [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s from this member.

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 removed [`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.
maiden fable
#

No error

#

that is the fricking issue

oblique adder
slate swan
maiden fable
#

@slate swan did u subclass on_error or on_command_error method

oblique adder
slate swan
maiden fable
#

WHY IS DISNAKE PLAYING WITH US THEN

grim oar
#

Are you using some error handler@slate swan

oblique adder
maiden fable
#

try adding this line at the top of the function

slate swan
# oblique adder what ?

Mushroom bot is a bot which tracks user's gaming activity and uses it for leaderboards or something , if you have a similar bot its likely that you may get those intents

simple features like member's status or spotify song wont help u get it.

maiden fable
#

await self.wait_until_ready

slate swan
maiden fable
#

!d discord.ext.commands.Bot.wait_until_ready

unkempt canyonBOT
#

await wait_until_ready()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits until the client’s internal cache is all ready.
maiden fable
#

Yea

#

Add this line at the top

#

Yea

#

Don't forget to call the function

maiden fable
#

after this line

oblique adder
#

thx

maiden fable
#

after the def line

slate swan
#

you cant use await outside a coro

slate swan
oblique adder
maiden fable
#

Rip...

#

@slate swan mind helping here?

slate swan
#

what's self.CLAIMED_THREAD_ROLE

#

if its a Role object already , get_role() returns None , and thus role variable is None too
same goes for a string

#

any on_command_error/on_error event?

tacit horizon
#

if message.channel.id == 916441194337296424 or discord.ChannelType.private

#

how to make it possible

maiden fable
clever pivot
#

on client.wait_for('message'), it waits for a user input message. how do i make it wait for a mention?

#

i have a lot of other servers

#

just shut up and leave me alone bro

#

on client.wait_for('message'), it waits for a user input message. how do i make it wait for a mention?

maiden fable
maiden fable
#

!d discord.Message.mentions

unkempt canyonBOT
#

A list of Member that were mentioned. If the message is in a private message then the list will be of User instead. For messages that are not of type MessageType.default, this array can be used to aid in system messages. For more information, see system_content.

Warning

The order of the mentions list is not in any particular order so you should not rely on it. This is a Discord limitation, not one with the library.

clever pivot
#

yeah someone told me message.mentions but i didnt know how to use it

maiden fable
#

!d discord.Message.channel_mentions also exists if u wanna wait for channel mention

unkempt canyonBOT
maiden fable
#

!d discord.Message.role_mentions is also there

unkempt canyonBOT
clever pivot
maiden fable
#

since 0 is the same as False and >0 is the same as True

clever pivot
#

!= is check right?

maiden fable
#

It means not equal to

#

if the length of message.mentions isn't equal to 0

#

That means, there should be at least 1 mention

clever pivot
#

so what im trying to do is like a complicated kick command

async def kick(ctx):
    await ctx.send('mention member to kick')
    try:
        message = client.wait_for("message", check=lambda msg: len(msg.mentions) != 0)
    except asyncio.TimeoutError:
        await ctx.send('timeout')
    ```
slate swan
#

why not use a member argument

maiden fable
#

Ah

clever pivot
#

but i think it wont work with wait_for

slate swan
maiden fable
#

His wish oki

clever pivot
#

haha it wont work i think

slate swan
maiden fable
#

It will

#

after the except block

#

Add a finally block

#

!d finally

unkempt canyonBOT
#

8.4. The try statement

The try statement specifies exception handlers and/or cleanup code for a group of statements...

maiden fable
#

and in it, just do await message.mentions[0].kick(reason-...)

clever pivot
maiden fable
#

and do u know what is that code doing?

velvet tinsel
#

morning

maiden fable
#

The code u just added

#

I can explain if u want me to

#

Hi (Dekriel)

clever pivot
maiden fable
#

What it is doing

fading harness
#

yeah

clever pivot
maiden fable
#

Do u know what is message.mentions[0] doing?

clever pivot
fading harness
maiden fable
#

Lmao thought so

royal oar
#

Would anyone be able to help me hide a cog? I was looking at a thing a person sent me earlier but I can't see anything on it.

maiden fable
unkempt canyonBOT
#
I don't think so.

No documentation found for the requested symbol.

maiden fable
#

Rip I forgot the attr

#

!d discord.ext.commands.Cog

unkempt canyonBOT
#

class discord.ext.commands.Cog(*args, **kwargs)```
The base class that all cogs must inherit from.

A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the [Cogs](https://discordpy.readthedocs.io/en/master/ext/commands/cogs.html#ext-commands-cogs) page.

When inheriting from this class, the options shown in [`CogMeta`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CogMeta "discord.ext.commands.CogMeta") are equally valid here.
maiden fable
#

gimme a min

royal oar
#

K

fading harness
maiden fable
#

!d discord.ext.commands.CogMeta.command_attrs

unkempt canyonBOT
#

A list of attributes to apply to every command inside this cog. The dictionary is passed into the Command options at __init__. If you specify attributes inside the command attribute in the class, it will override the one specified inside this attribute. For example:

class MyCog(commands.Cog, command_attrs=dict(hidden=True)):
    @commands.command()
    async def foo(self, ctx):
        pass # hidden -> True

@commands.command(hidden=False)
    async def bar(self, ctx):
        pass # hidden -> False
clever pivot
fading harness
unkempt canyonBOT
#

A list of Member that were mentioned. If the message is in a private message then the list will be of User instead. For messages that are not of type MessageType.default, this array can be used to aid in system messages. For more information, see system_content.

Warning

The order of the mentions list is not in any particular order so you should not rely on it. This is a Discord limitation, not one with the library.

maiden fable
#

Do u know about lists and how to index them?

valid galleon
#

can anyone provide an example for running a task at a specific time? i believe thats a new feature in 2.0.0, but i cant figure out how to use it with a timezone

royal oar
clever pivot
valid galleon
#

an example with a timezone would be very useful

maiden fable
unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

fading harness
#

yeah

valid galleon
#

the docs arent very clear with the usage of that

fading harness
maiden fable
#

!d discord.ext.tasks.Loop lemme see, I haven't heard about that tbh

unkempt canyonBOT
#

class discord.ext.tasks.Loop```
A background task helper that abstracts the loop and reconnection logic for you.

The main interface to create this is through [`loop()`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.loop "discord.ext.tasks.loop").
fading harness
#
@tasks.loop(hours=24)
async def daily_task():
    ...

@daily_task.before_loop
async def wait_until_7am():
    # this will use the machine's timezone
    # to use a specific timezone use `.now(timezone)` without `.astimezone()`
    # timezones can be acquired using any of
    # `datetime.timezone.utc`
    # `datetime.timezone(offset_timedelta)`
    # `pytz.timezone(name)` (third-party package)
    now = datetime.datetime.now().astimezone()
    next_run = now.replace(hour=7, minute=0, second=0)

    if next_run < now:
        next_run += datetime.timedelta(days=1)

    await discord.utils.sleep_until(next_run)
valid galleon
maiden fable
#

🤣 u also ran the command in that server and so did I

fading harness
maiden fable
#

Yups, saw it

valid galleon
fading harness
valid galleon
#

hmm that could work, let me try it out

fading harness
valid galleon
#

oh damn

velvet tinsel
#

what are you trying to do?

valid galleon
#

ig i'll just do it long way lol

maiden fable
#

!d discord.ext.tasks.Loop

unkempt canyonBOT
#

class discord.ext.tasks.Loop```
A background task helper that abstracts the loop and reconnection logic for you.

The main interface to create this is through [`loop()`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.loop "discord.ext.tasks.loop").
maiden fable
#

lemme see

#

!d discord.ext.tasks.Loop.time it needs a list of datetime objects for some reason @valid galleon @fading harness

unkempt canyonBOT
#

property time: Optional[List[datetime.time]]```
Read-only list for the exact times this loop runs at. `None` if relative times were passed instead.

New in version 2.0.
cloud dawn
#

See of it like planned events.

maiden fable
#

Yea, that is what they want to do...

cloud dawn
#

I mean ig you can generate a list of it for the next 30 days if your bot has structured maintenance anyways

slate swan
#

how can I host my discord bot on vultr?

cloud dawn
slate swan
#

ah man

cloud dawn
slate swan
#

why

cloud dawn
neat kestrel
#

any mute command example?

#

i want to make the muted role on guild join there might be a example or someone has written it before i can use?

cloud dawn
neat kestrel
slate swan
# neat kestrel any mute command example?
@client.command(description="Mutes the specified user.")
@commands.has_permissions(manage_messages=True)
async def mute(ctx, member: discord.Member, *, reason=None):
    guild = ctx.guild
    mutedRole = discord.utils.get(guild.roles, name="Muted")
    
    if not mutedRole:
        mutedRole = await guild.create_role(name="Muted")
        
        for channel in guild.channels:
            await channel.set_permissions(mutedRole, speak=False, send_messages=False, read_messages_history=True, read_messages=False)
#

something like that

neat kestrel
#

i see thanks

slate swan
#

np

neat kestrel
#

await member.remove_roles(mutedRole) this for removeing right

slate swan
#

looks like it

#

Yea , that's it
And don't use camelCase in python.

maiden fable
neat kestrel
#

can i have an example?

slate swan
#

it's not a feature in discord.py , you'll have to use some fork

#

And the examples change according to what for you use.

neat kestrel
#

bot.load_extension("./cogs/moderation.py")

#
discord.ext.commands.errors.ExtensionNotFound: Extension './cogs/moderation.py' could not be loaded.```
#

why this error?

solar pine
#

Hello, does anyone know how to make a reddit feed? I.e. get all new posts from a specific subreddit and post them automatically to a channel

#

I got the connecting part down using praw, but the problem is I need to use commands to get a random post, I don't know how to make it automated

neat kestrel
#

isnt it made with webhooks?

cloud dawn
#

Can someone please explain this guild = ctx.guild

neat kestrel
#

its gets the user's guild

solar pine
neat kestrel
#

wait i didnt know discord added timeout

#

lol

cloud dawn
maiden fable
neat kestrel
cloud dawn
unkempt canyonBOT
#

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

Times out the member from the guild; until then, the member will not be able to interact with the guild.

Exactly one of `duration` or `until` must be provided. To remove a timeout, set one of the parameters to `None`.

You must have the [`Permissions.moderate_members`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.

New in version 2.3.
maiden fable
#

It's the difficult art of assigning the easy attribute, named guild, belonging to the commands.Context class to a variable so as to increase the memory usage of the application and to decrease the length of the line as a whole.

maiden fable
#

Totally Not Being Sarcastic

cloud dawn
#

Sus

maiden fable
#

I just explained it to you in the easiest way possible

neat kestrel
#

i mean using this function is better lol

cloud dawn
#

Still makes no sense, yet to be convinced.

maiden fable
#

Lmao

cloud dawn
maiden fable
#

Attribute/Property

neat kestrel
#

omg imagine talking

#

words so serious

cloud dawn
#

I mean there is a difference yeah.

#

Idk if it has actual performance benefits to it though.

neat kestrel
#

just makes it easier imo

cloud dawn
#

Doesn't really look pythonic.

#

.topic @maiden fable

lament depotBOT
#
**What feature would you be the most interested in making?**

Suggest more topics here!

neat kestrel
#

btw have an expample for await timeout?

vocal snow
#

await timeout?

velvet tinsel
maiden fable
maiden fable
cloud dawn
oblique adder
#

How do I check the vc that the bot is connected tto ?

slate swan
unkempt canyonBOT
#

property me: discord.member.Member```
Similar to [`Client.user`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client.user "discord.Client.user") except an instance of [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member"). This is essentially used to get the member version of yourself.
slate swan
#

gives you the bot as a member , just .voice.channel to get the channel

oblique adder
#

so
ctx.guild.me.voice.channel ?

slate swan
#

yes , but it may raise an error if the bot is not in a voice channel. you gotta check if ctx.guild.me.voice is not None first

valid galleon
#

so i have a task which checks the date and time and sends a message in a channel when the time is equal to the set value.is there a chance the bot could break if i run this every one second or so?

slate swan
#

nope , looping every second wont break your bot

primal salmon
slate swan
slate swan
#

a loop wont make any change until you send a web req

valid galleon
#

thanks for the help

slate swan
gentle badger
#

How to make a button after that Who presses the button It changes part of a message and writes the name of the person who clicked the button

(Private button)

slate swan
#

!d disnake.Interaction.author

unkempt canyonBOT
slate swan
#

replace disnake with discord

#

!d discord.Message.edit

unkempt canyonBOT
#

await edit(content=..., embed=..., embeds=..., attachments=..., suppress=..., delete_after=None, allowed_mentions=..., view=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the message.

The content must be able to be transformed into a string via `str(content)`.

Changed in version 1.3: The `suppress` keyword-only parameter was added.
slate swan
#
    async def join(self, ctx, *, channel:   discord.VoiceChannel):
    
     if ctx.voice_client is not None:
        await return 
  ctx.voice_client.move_to(channel)

     await channel.connect()```  I tried running this and no synthax but bot never joined, any pointers?
slate swan
maiden fable
leaden hollow
#

Just wondering is a code editor like vs Code enough for bot developing or a proper ide would help more

pine crown
#

how to send custom emojis with python

cloud dawn
pine crown
pine crown
cedar stream
maiden fable
# pine crown ?

Just add a \ in front of the emoji name to get it's full name with the ID

cloud dawn
maiden fable
#

And then add it to yr bot code

cedar stream
pine crown
slate swan
unkempt canyonBOT
pine crown
cedar stream
#

#

Where do u want to send emoji

pine crown
#

in a embed

#

i mean

leaden hollow
pine crown
#

button

#
label=':pexi2: Website'

like this?

slate swan
#

no

#

it takes an emoji kwarg

#

!d discord.ui.Button

leaden hollow
unkempt canyonBOT
#

class discord.ui.Button(*, style=<ButtonStyle.secondary: 2>, label=None, disabled=False, custom_id=None, url=None, emoji=None, row=None)```
Represents a UI button.

New in version 2.0.
pine crown
#

ok

cedar stream
pine crown
#
self.add_item(disnake.ui.Button(label=':pexi2: Website', style=disnake.ButtonStyle.blurple, emoji=':pexi2:', 
```?
cedar stream
#

emoji = discord.emoji… send(emoji)

leaden hollow
#

You need full Id of emoji

#

It looks like this

pine crown
leaden hollow
cedar stream
pine crown
leaden hollow
slate swan
pine crown
cedar stream
leaden hollow
leaden hollow
pine crown
#

Now will work?

cedar stream
leaden hollow
#

It should work

#

Try it

cedar stream
#

We arent interpreters

pine crown
#

Just asking cuz i thought must it the emoji like somewhere

cedar stream
#

?

pine crown
#

Ok works

green bluff
#

instead of ctx.channel.purge

#

how do i delete the authors message

#

when command is executed

slate swan
#

use a check

green bluff
#

how?

slate swan
#

!d discord.TextChannel.purge

unkempt canyonBOT
#

await purge(*, limit=100, check=..., before=None, after=None, around=None, oldest_first=False, bulk=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Purges a list of messages that meet the criteria given by the predicate `check`. If a `check` is not provided then all messages are deleted without discrimination.

You must have the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission to delete messages even if they are your own. The [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission is also needed to retrieve message history.

Examples

Deleting bot’s messages...
slate swan
#

it needs to be a function

green bluff
#

oh ok

#

so check if

slate swan
#

which returns a True if your condition is qualified

green bluff
#

so what do i checek for

slate swan
#

?

green bluff
#

check if ctx.author ==

#

lemme just find out

#

what a check is

green bluff
#

on how do i use a check

maiden fable
#

Just do ctx.message.delete()

green bluff
#

oh

maiden fable
#

It will delete the command message

slate swan
#

jeex , i misread the question

maiden fable
#

Imagine using purge rip

cedar stream
maiden fable
#

Not The Bot's Message

cedar stream
maiden fable
#

Ah well yea, I know about that. It's the same as

msg = await ctx.send(...) 
await asyncio.sleep(...) 
await msg.delete(...) tho
cedar stream
#

Yes lmao, I used to write this

#

Then I saw u can just add kwarg and get rid of all this

unkempt canyonBOT
#

discord/abc.py line 1071

await ret.delete(delay=delete_after)```
maiden fable
#

Yea haha

#

It's just neater that's it

green bluff
#

datetime.now isnt a thing?

slate swan
unkempt canyonBOT
#

classmethod datetime.now(tz=None)```
Return the current local date and time.

If optional argument *tz* is `None` or not specified, this is like [`today()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.today "datetime.datetime.today"), but, if possible, supplies more precision than can be gotten from going through a [`time.time()`](https://docs.python.org/3/library/time.html#time.time "time.time") timestamp (for example, this may be possible on platforms supplying the C `gettimeofday()` function).

If *tz* is not `None`, it must be an instance of a [`tzinfo`](https://docs.python.org/3/library/datetime.html#datetime.tzinfo "datetime.tzinfo") subclass, and the current date and time are converted to *tz*’s time zone.

This function is preferred over [`today()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.today "datetime.datetime.today") and [`utcnow()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow "datetime.datetime.utcnow").
slate swan
green bluff
#

oh

slate swan
#

yessir

kindred drum
#
user = guild.get_member(pre_user_id)``` anyone know why this prints as none? pre_user-id is the id of the user
slate swan
#

no member with that id is in the server or you dont have member intents

#

nvm God Sarthak is here

devout iris
#

i have 2 embed 1 embed for first message and embed2 is for edit it,How can I delete embed1 after sending embed2?
using on_message event

slate swan
#

if its not in any of bot's server why would it be a member

kindred drum
slate swan
#

😂

slate swan
unkempt canyonBOT
#

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.

slate swan
slate swan
slate swan
devout iris
primal salmon
#

has anyone made discord music bot

slate swan
#

anyone tried pincer yet?

#

pincer?

slate swan
slate swan
unkempt canyonBOT
devout iris
slate swan
#

naise

#

damn the syntax looks so uwu

#

bruh

slate swan
#

llol

slate swan
devout iris
slate swan
slate swan
#

then send it (store in a var) and use the delete method on it whenever convenient

slate swan
#

pincer commands look like dpy commands lol

#

oof

#
msg = await send(embed=embed1)
await send(embed=embed2)
await msg.delete()
``` get some hint ![Exit](https://cdn.discordapp.com/emojis/918157425692016660.webp?size=128 "Exit")
slate swan
#

i hope they dont make it look like a fork

slate swan
devout iris
#

ah okayy

primal salmon
#

hmmm

#

imma improve my moderation bot lemon_angrysad

slate swan
#

is it just me?

primal salmon
#

joe_8bit lol

slate swan
#

the failed image embedding

slate swan
#

and LMAO

#

okimii using big words

slate swan
primal salmon
#

oh ye

#

nvm I forgot the question I was asking

slate swan
slate swan
#

its fun

primal salmon
slate swan
#

subclass discord.ext.commands.Bot

primal salmon
slate swan
sour ember
primal salmon
slate swan
#

nothing (depends)

#

lol

slate swan
primal salmon
#

ngl I literally lost some braincells ._. they keep telling me I should stop using android

slate swan
#

stop using android thats just nonsense

primal salmon
#

aight imma delete discord

slate swan
#

same

slate swan
primal salmon
#

ducky_maul u first then ill

slate swan
primal salmon
#

shipit and I didnt say anything about "I wont install discord anymore" hehehe

slate swan
unkempt canyonBOT
slate swan
primal salmon
#

k bye imma make my moderation bot

slate swan
#

gl

slate swan
primal salmon
#

shipit Wish I can use that luck

primal salmon
slate swan
manic wing
#

ashley why dont you go to school

primal salmon
#

delete discord then install discord and then make the bot

slate swan
#

lmaooopithink

primal salmon
slate swan
#

the teacher's absent

primal salmon
#

...

slate swan
manic wing
slate swan
primal salmon
#

They will need the "Absent Slip" ngl

slate swan
slate swan
slate swan
primal salmon
#

oh widgets is the Label and embeds are like categories in it

slate swan
primal salmon
#

pithink or im wrong

manic wing
#

okimii what time is it for you

slate swan
primal salmon
#

yert nvm I should go lmao

slate swan
slate swan
manic wing
#

ok

slate swan
edgy finch
#

hi

#

yo

#

!rank

unkempt canyonBOT
#

Iterating over range(len(...)) is a common approach to accessing each item in an ordered collection.

for i in range(len(my_list)):
    do_something(my_list[i])

The pythonic syntax is much simpler, and is guaranteed to produce elements in the same order:

for item in my_list:
    do_something(item)

Python has other solutions for cases when the index itself might be needed. To get the element at the same index from two or more lists, use zip. To get both the index and the element at that index, use enumerate.

edgy finch
#

!python

#

!resources

unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

slate swan
#

#bot-commands

edgy finch
#

?

slate swan
primal salmon
#

just made the mention = prefix

slate swan
primal salmon
#

wym?

slate swan
#

tell me you didnt add the id and <@>

slate swan
primal salmon
#

oh I mean if u mention the bot it will say the messages u want it to send

slate swan
#

P.R.O.

slate swan
#

no thats not how u do it , its @Username#Discim

slate swan
primal salmon
#

got the wrong thing

slate swan
#

yeah so he used the on mention prefix

slate swan
primal salmon
#
@client.event
async def on_message(msg):
    if client.user.mentioned_in(msg):
        await msg.channel.send(embed=discord.Embed(title="Prefix", description=f"My prefix is {prefix}",color=0x206694))
slate swan
#

!d discord.ext.commands.when_mentioned

unkempt canyonBOT
#

discord.ext.commands.when_mentioned(bot, msg)```
A callable that implements a command prefix equivalent to being mentioned.

These are meant to be passed into the [`Bot.command_prefix`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.command_prefix "discord.ext.commands.Bot.command_prefix") attribute.
slate swan
slate swan
primal salmon
#

pithink or u guys talking bout other thing

primal salmon
slate swan
#

theres when_mention_or("")

#

no

#

yes

#
    from discord.ext import commands
ImportError: cannot import name 'commands' from 'discord.ext' (unknown location)

Unable to import discord.ext.commands, for some reason
My imports:

import os
import colorama
import discord
import discord.ext
import datetime
from discord.ext import commands
from discord.ext import tasks
import random
import requests
import json
import asyncio
import time
from colorama import Fore

Does anyone know why this doesn't work? I'm using Discordpy.

#

It's when_mentioned_or

slate swan
#

Oki

slate swan
slate swan
#

and you can use brackets to import msny stuff

slate swan
slate swan
slate swan
slate swan
#

That would work , but when_mention_or won't lmao

slate swan
primal salmon
edgy finch
#

can you give me free nitro

slate swan
edgy finch
#

pls

slate swan
slate swan
#

i dont have nitro myself

slate swan
# slate swan Still unable to import, same error.
    from discord.ext import commands
ImportError: cannot import name 'commands' from 'discord.ext' (unknown location)

My code:

import os
import colorama
import discord
import datetime
from pypresence import Presence
from discord.ext import commands
from discord.ext import tasks
import random
import requests
import json
import asyncio
import time
from colorama import Fore
edgy finch
#

someone else

edgy finch
#

how?

slate swan
slate swan
slate swan
manic wing
#

did you do pip install discord or pip install discord.py

slate swan
edgy finch
#

how did you make it

slate swan
slate swan
slate swan
manic wing
slate swan
#

ah ok thanks

#

welcome

edgy finch
#

@slate swan

slate swan
#

pycord ☠️

edgy finch
#

how did you make it

manic wing
slate swan
#

cool then

primal salmon
slate swan
devout iris
#

.

slate swan
#

lmfao

slate swan
primal salmon
slate swan
slate swan
edgy finch
slate swan
unkempt canyonBOT
slate swan
#

okimii high spams random commands?

#

like a dev?

slate swan
slate swan
slate swan
slate swan
slate swan
edgy finch
slate swan
#

chicken?

primal salmon
#

whats to make it organised?
do ban/unban then mute/unmute and lasty Kick?

slate swan
edgy finch
primal salmon
#

or should I just make the #------Mute------#

slate swan
slate swan
marsh kestrel
#

how do i code a discord bot in python? i cant find a proper tutorial on youtube (like what do i need to install etc.)

slate swan
edgy finch
#

pls

slate swan
#

oof

primal salmon
slate swan
slate swan
safe sierra
#

guys is it useful if I made a calculator bot which calculates almost anything like doing calculus and trigonometry stuff?

slate swan
marsh kestrel
slate swan
green bluff
primal salmon
green bluff
#

any help

slate swan
#

Tho how would it get user inputs like the integration sign and log

slate swan
primal salmon
safe sierra
#

no no im already making it with commands like diff() integrate() and expanding polynomials

green bluff
#

can someone help pls

primal salmon
slate swan
primal salmon
slate swan
primal salmon
green bluff
#

help pls

safe sierra
#

im almost done, if you wanna join the test server, you're most welcome

slate swan
primal salmon
primal salmon
#

joe_8bit idk how tbh but try it

manic wing
slate swan
devout iris
#

how to clear help command?

primal salmon
#

shhh

manic wing
primal salmon
#

yert u ruined my plan

slate swan
slate swan
#

ahrixjam And make your custom one

#

who actually subclasses itpithink

primal salmon
#

2 people ruined my plab 🥲

slate swan
#

cuz i dont👁️ 👁️

devout iris
#

i want to clear :/

manic wing
slate swan
safe sierra
#

anyone wanna test my calculator bot?

slate swan
#

just set it to None , or use bot.remove_command("help")

#

set the kwarg as None

primal salmon
#

sheesh dont have to be rude...

slate swan
#

caeden chill out

devout iris
slate swan
#

yw

#

what's the need of being hostile to a beginner?

primal salmon
#

ikr

slate swan
#

werent you a clueless beginner once?

primal salmon
#

joe_8bit u got a point, but ik author mean the members

#

and im saying u got a point cuz theyre once a beginner

slate swan
#

we all started from somewhere and people start at different times yes its misinformation just say he isnt correct no need to be hostile he isnt a threat

primal salmon
#

and that 2nd one is to answer that caeden

slate swan
#

!d discord.ext.commands.Context.author can be a user or member.

unkempt canyonBOT
safe sierra
#

@primal salmonbro my bot started check it out

primal salmon
slate swan
#

im going to school have a great day guys pithink

slate swan
slate swan
slate swan
slate swan
slate swan
slate swan
unkempt canyonBOT
slate swan
keen talon
slate swan
slate swan
keen talon
slate swan
primal salmon
#

is there difference between discord.guild.ban and discord.Member.ban?

maiden fable
#

No

kind hill
#

You can use the guild instance to ban any user, including users that are not a member of your community. For a Member.ban, it has to be a Member.

maiden fable
#

Yea, that too

slate swan
#

yea in case you want to ban someone who is not in the current Guild

primal salmon
#

imma use guild so I wont have to change it if im planning to ban someone whos not from the server

cold sonnet
#

oh nah, I just can't read it till the end

boreal ravine
primal salmon
#

wait do I use if after doing async def

cold sonnet
#

async def if?

primal salmon
#

like async def lol(ctx):
if

boreal ravine
slate swan
primal salmon
cold sonnet
boreal ravine
primal salmon
#

ah kk

visual island
#

it is fine in pc i think

slate swan
boreal ravine
#

where have I heard the name cirno from

boreal ravine
primal salmon
#

holdup I forgot how to do this lol

visual island
primal salmon
#

async def ban(ctx, guild): or should I just remove the guild

keen talon
#

Use a member instead pithink

slate swan
#

why do you want guild as a parameter in ban command?

boreal ravine
#

did you even add guild

primal salmon
slate swan
#

if you want current server's object use ctx.guild...

boreal ravine
#

mate which one are you gonna use

primal salmon
#

wym

#

lmao ure confused while im also confused

#

#360DegreeConfusion

boreal ravine
#

Guild.ban or Member.ban??

primal salmon
#

Guild.ban

visual island
#

either use ctx.guild and add member argument, or add guild, member and use await guild.ban(member)

#

and typehint it

primal salmon
#

aight

cloud dawn
#

There is a difference between a user and a member.

maiden fable
#

imho, the member.ban is cleaner if u got the member object

maiden fable
#

Actually there's no need for it to be updated that much... The source code is easily and u can easily edit it to match with the latest syntax and use it

cloud dawn
#

Your own IPC or API.

#

If you ever want to make it public the dashboard you would need to make your own api.

maiden fable
#

The only mechanism it works in is, creating a websocket connection with the bot and requesting for data

boreal ravine
#

you don't even need to be smart to do what hunter said

maiden fable
#

If I can understand the source, anyone can

cloud dawn
#

I recommend your own api or maby even a redis to connect it to.

#

as extra.

kindred drum
#

yo anyone know why this returns none? await user.add_roles(role)

#

I have member intents

cloud dawn
kindred drum
#

I mean

#
user = guild.get_member(pre_user_id)``` returns none
cloud dawn
kindred drum
#

fetch_member?

slate swan
cloud dawn
#

You would also need to use an aoth extension or make one yourself. Conclusion you need a lot of skills and combine that to make this all work.

maiden fable
#

Why fetch

cloud dawn
#

!d discord.Guild.fetch_member

unkempt canyonBOT
#

await fetch_member(member_id, /)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Retrieves a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") from a guild ID, and a member ID.

Note

This method is an API call. If you have [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") and member cache enabled, consider [`get_member()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.get_member "discord.Guild.get_member") instead.
kindred drum
maiden fable
#

Rip, best of luck trying to secure it from hackers

#

@kindred drum what happened

cloud dawn
slate swan
#

pithink thats what I said

#

lol

maiden fable
cloud dawn
maiden fable
#

People can simply open the console, see how your API works and very easily request yr bot's token or any other sensitive information without anyone knowing

kindred drum
#

user = guild.fetch_member(pre_user_id)

#

would that be the syntax

slate swan
maiden fable
slate swan
kindred drum
maiden fable
#

Yes.

kindred drum
#

AttributeError: 'coroutine' object has no attribute 'add_roles'

visual island
maiden fable
# slate swan *cof cof*

What if they are using the difficult art of assigning the easy attribute, named guild, belonging to the commands.Context class to a variable so as to increase the memory usage of the application and to decrease the length of the line as a whole?

visual island
#

await

kindred drum
#

just nt in the way I want

slate swan
#

bye

kindred drum
#

👋

maiden fable
slate swan
#

Does anyone know how I can do a perms check with the database, I have a command to add a person in the premium category and I would like her to use only those commands. I use mongodb

potent spear
slate swan
#

I use mongodb to store users

cloud dawn
unkempt canyonBOT
#

@disnake.ext.commands.check(predicate)```
A decorator that adds a check to the [`Command`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Command "disnake.ext.commands.Command") or its subclasses. These checks could be accessed via [`Command.checks`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Command.checks "disnake.ext.commands.Command.checks").

These checks should be predicates that take in a single parameter taking a [`Context`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.Context "disnake.ext.commands.Context"). If the check returns a `False`-like value then during invocation a [`CheckFailure`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.CheckFailure "disnake.ext.commands.CheckFailure") exception is raised and sent to the [`on_command_error()`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.disnake.ext.commands.on_command_error "disnake.disnake.ext.commands.on_command_error") event.

If an exception should be thrown in the predicate then it should be a subclass of [`CommandError`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.CommandError "disnake.ext.commands.CommandError"). Any exception not subclassed from it will be propagated while those subclassed will be sent to [`on_command_error()`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.disnake.ext.commands.on_command_error "disnake.disnake.ext.commands.on_command_error").
cloud dawn
#

Sniper's method has flaws since they then only can perform that command inside 1 guild.

slate swan
#

I want for all guilds

cloud dawn
potent spear
#

then you'll have to keep a cache of all guild / member_id's who are premium, because you obviously don't want to fetch whenever a command check is executed

primal salmon
#

anyone know how to make it like the bot sent dm to the member when the mod using the commands

#

like if a mod banned someone , the bot will dm the banned person

potent spear
primal salmon
potent spear
#

nope

primal salmon
#

🥲 ig im dumb

potent spear
#

it's in the FAQ of the docs

cloud dawn
cloud dawn
primal salmon
#

albeit?

slate swan
slate swan
#

I keep the cache

#

Now I see if I can do something

#

Thanks

potent spear
#

and scroll down to the examples

cloud dawn
slate swan
#

Yea yea ik thx

primal salmon
#

await ctx.send is suppose to make the bot send the messages right?

timid wagon
#

Yep

primal salmon
#

somehow mine didnt lemon_angrysad

timid wagon
#

Well, can you share the code?

#

The general example is:

@bot.command()
async def command(ctx):
    await ctx.send("your content goes here")
slim ibex
primal salmon
#
async def on_comand_error(ctx, error):
    if isinstance(error, commands.MissingRequiredArguement):
        await ctx.send('Please include all the requirement')
    if isinstance(error, commands.MissingPermissions):
        await ctx.send('You dont have permissions to do this!')
primal salmon
primal salmon
#

somehow that gave a different problem xD

timid wagon
#

What's the error :P

primal salmon
#

nvm it didnt change the problem

#

the one changed the problem was I added @client.event

#

joe_8bit but still I got the same problem

timid wagon
#

Well, a few questions:

  1. Have you specified client.event or not?
  2. Is this in a cog?
primal salmon
#

and 1) if I use client.event it somehow give other problem like this

timid wagon
#

dead there's a typo

primal salmon
timid wagon
#

It's commands.MissingRequiredArgument

#

!d discord.ext.commands.MissingRequiredArgument

unkempt canyonBOT
#

exception discord.ext.commands.MissingRequiredArgument(param)```
Exception raised when parsing a command and a parameter that is required is not encountered.

This inherits from [`UserInputError`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.UserInputError "discord.ext.commands.UserInputError")
primal salmon
#

a-

#

smh my spelling became lower nowdays

timid wagon
#

All good

primal salmon
#

ty xD fixed

timid wagon
#

👍

true moon
#

please can some1 tell me how can i implement my own cooldown?

#

per every command

slim ibex
#

!d discord.ext.commands.cooldown

unkempt canyonBOT
#

@discord.ext.commands.cooldown(rate, per, type=discord.ext.commands.BucketType.default)```
A decorator that adds a cooldown to a [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command")

A cooldown allows a command to only be used a specific amount of times in a specific time frame. These cooldowns can be based either on a per-guild, per-channel, per-user, per-role or global basis. Denoted by the third argument of `type` which must be of enum type [`BucketType`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.BucketType "discord.ext.commands.BucketType").

If a cooldown is triggered, then [`CommandOnCooldown`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CommandOnCooldown "discord.ext.commands.CommandOnCooldown") is triggered in [`on_command_error()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.discord.ext.commands.on_command_error "discord.discord.ext.commands.on_command_error") and the local error handler.

A command can only have a single cooldown.
cloud dawn
#

@primal salmon lmfao caeden got banned.

#

He was a regular 😔

slate swan
#

wait what

cloud dawn
rancid stump
#

hy guys is there is any way that my bot will only work in server not in private dm

slate swan
#

!d discord.ext.commands.guild_only

unkempt canyonBOT
#

@discord.ext.commands.guild_only()```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that indicates this command must only be used in a guild context only. Basically, no private messages are allowed when using the command.

This check raises a special exception, [`NoPrivateMessage`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.NoPrivateMessage "discord.ext.commands.NoPrivateMessage") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
rancid stump
velvet tinsel
#

I dare you to try

rancid stump
velvet tinsel
#

gl on that

leaden jasper
#

how to stop the same command being run at the same time

#

or before the last one has finished

#

or stops the last one

rancid stump
velvet tinsel
#

next time: don't copy off the docs, read it

maiden fable
unkempt canyonBOT
#

@discord.ext.commands.max_concurrency(number, per=discord.ext.commands.BucketType.default, *, wait=False)```
A decorator that adds a maximum concurrency to a [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command") or its subclasses.

This enables you to only allow a certain number of command invocations at the same time, for example if a command takes too long or if only one user can use it at a time. This differs from a cooldown in that there is no set waiting period or token bucket – only a set number of people can run the command.

New in version 1.3.
rancid stump
#

can you help me where to implement this .. ?

velvet tinsel
#

remove discord.ext and you'd be left with what you need

#

shitt

#

I keep misspelling

rancid stump
slim ibex
velvet tinsel
slim ibex
#

🗿

primal salmon
rancid stump
#

btw guys where you hosted your bots ?

primal salmon
#

:v now ill need to make more

cloud dawn
cloud dawn
primal salmon
#

wait when did he insulted me?

cloud dawn
primal salmon
#

was bout to reply to that

cloud dawn
#

We all laughed at him, we got a private server with all the regulars of the python-bots channel

primal salmon
#

lol

#

wait u said he was a regular

cloud dawn
#

Yeah he is active

#

So he is a regular in this channel\

primal salmon
#

xD but is he at the private server

cloud dawn
#

well was

primal salmon
#

joe_8bit I dont think he got banned just by 1 insult

cloud dawn
#

Well we discuss some small things there.

cloud dawn
primal salmon
#

lol

#

shipit sus

primal salmon
#

got no respect but I can see that he's a good/bad person xD aka half half

cloud dawn
#

His intentions are good.

primal salmon
#

but the way he said it

cloud dawn
#

Just the execution.. err

velvet tinsel
#

Caeden is funny

#

in....one way or another

primal salmon
#

many ways

rancid stump
#

hy guys can someone help me where to implement this

client.ext.commands.guild_only()

it didn't work like this

cloud dawn
#

Caeden is **** and **

primal salmon
#

some bad ways and some good ways ig

slate swan
velvet tinsel
slate swan
#

!d discord.Message.guild

unkempt canyonBOT
primal salmon
slate swan
#

this will not be None if the message was used in a server

rancid stump
primal salmon
#

u need to put that under @client.command

cloud dawn
velvet tinsel
primal salmon
#

yert wotah?

slate swan
#

so you can py if not message.guild : return

velvet tinsel
#

it's an on_message pithink

primal salmon
#

nvm

rancid stump
cloud dawn
slate swan
velvet tinsel
#

probably you should have said client.listen() or something else

primal salmon
#

pithink I only have ban/unban and help conmands so far

cloud dawn