#discord-bots

1 messages · Page 870 of 1

modern fiber
#

whats wrong..?

unkempt yacht
#

I'm getting an error for my calculator command. Here's the code:

        blocks = [
            block.MathBlock(),
            block.RandomBlock(),
            block.RangeBlock(),
        ]
        self.engine = Interpreter(blocks)

    @commands.command(aliases=["calc"])
    async def calculate(self, ctx, *, query, message):
        """Math"""
        query = query.replace(",", "")
        engine_input = "{m:" + query + "}"
        start = time.monotonic()
        output = self.engine.process(engine_input)
        end = time.monotonic()

        output_string = output.body.replace("{m:", "").replace("}", "")
        try:
            fmt_str = f"{float(output_string):,}"
        except ValueError:
            fmt_str = output_string
        e = discord.Embed(
            color=await ctx.embed_color(),
            title=f"Input: `{query}`",
            description=f"Output: `{fmt_str}`",
        )
        e.set_footer(text=f"Calculated in {round((end - start) * 1000, 3)} ms")
        await ctx.send(embed=e)

#

and here's the error:

unkempt yacht
#

wdym

boreal ravine
#

show your on_command_error

unkempt yacht
#

i dont understand, i don't think I have one.

manic wing
#

full error?

unkempt yacht
manic wing
#

are you sure?

unkempt yacht
#

yes

manic wing
#

well despite the odd error

#

you did ,*, query, message

unkempt yacht
#

yea

manic wing
#

making message a kwarg

#

!kwarg

unkempt canyonBOT
#

*args and **kwargs

These special parameters allow functions to take arbitrary amounts of positional and keyword arguments. The names args and kwargs are purely convention, and could be named any other valid variable name. The special functionality comes from the single and double asterisks (*). If both are used in a function signature, *args must appear before **kwargs.

Single asterisk
*args will ingest an arbitrary amount of positional arguments, and store it in a tuple. If there are parameters after *args in the parameter list with no default value, they will become required keyword arguments by default.

Double asterisk
**kwargs will ingest an arbitrary amount of keyword arguments, and store it in a dictionary. There can be no additional parameters after **kwargs in the parameter list.

Use cases
Decorators (see !tags decorators)
Inheritance (overriding methods)
Future proofing (in the case of the first two bullet points, if the parameters change, your code won't break)
Flexibility (writing functions that behave like dict() or print())

See !tags positional-keyword for information about positional and keyword arguments

silk mauve
#

while True: await asyncio.sleep(60) timestamp = datetime.datetime.now() await message.edit(embed=embed)

#

Can someone tell me why this doesn't work?

#

It doesnt update the embed, it just show it edited it but doesnt update the time

quick gust
#

embed.timestamp

#

u never edited the embed object itself

silk mauve
#

Is there also any way to show how many people are on Online for example=

#

or on do not disturb?

#

Or Oflline?

slate swan
#

!d discord.Member.status

unkempt canyonBOT
#

property status: discord.enums.Status```
The member’s overall status. If the value is unknown, then it will be a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") instead.
kind cargo
#

anyone help me with this problem?
File "c:\Users\sweti\OneDrive\Skrivbord\drive-download-20220301T163300Z-001\main.py", line 50, in <module>
bot.run(TOKEN)

unkempt canyonBOT
#

Hey @quaint epoch!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

quaint epoch
#

!paste

unkempt yacht
#

I was wondering how i would be able to make something like this (a reaction role command).

slate swan
quaint epoch
quaint epoch
slate swan
#

dm = await member.create_dm() this is an extra step/api call

#

you can just Member.send() in 99% cases

quaint epoch
placid skiff
minor anvil
#

Someone gimme the funniest piece of code ever

placid skiff
#

so the code will work if the reaction is created when the bot is online but when you turn it offline or the reaction was created before the bot came online the bot will not see when a reaction will be addedd

quaint epoch
minor anvil
#

thank yoi

slate swan
minor anvil
#

thanks

quaint epoch
#

i sure love dm'ing bots

slate swan
quaint epoch
slate swan
#

if not isintance

quaint epoch
#

i didn't see that, sorry im using light mode

slate swan
#

nice excuse

quaint epoch
#

flashbang

#

my mom made me turn it on because "it's good for my eyes"

minor anvil
manic wing
quaint epoch
#

if python was a language that you can condense all in one line without lambdas, i would not program it

manic wing
quaint epoch
manic wing
manic wing
quaint epoch
manic wing
manic wing
#

too long, i cba

#

ill do the first 15 lines

quaint epoch
manic wing
#

you just want me to fix your code anyway

quaint epoch
#

anywhooo, i have math now cya

quaint epoch
#

no one uses it

modern fiber
#

how do I add allies on command?

manic wing
#

the code doesnt look very efficient in the slightest, not sure why someone would use it

manic wing
quaint epoch
modern fiber
#

ty

quaint epoch
#

oh yeah math cya

modern fiber
#

what about emojis, how do I add them (custom ones)?

manic wing
#

just put them in the alias

modern fiber
modern fiber
#

no I meant like for them to send it

manic wing
#

<name:id>

modern fiber
#

yeah but it doens't owrk like that

manic wing
#

why not?

modern fiber
#

let me show

#

it sends like this

manic wing
#

what are you trying to do?

modern fiber
livid jacinth
#

Hey I have @bot.event which sends a message when a certain user comes online. But the bot sends the message 4 times.

manic wing
#

remove the ~1

manic wing
#

what does your code look like?

livid jacinth
manic wing
#

try printing after.status

#

also you dont need to put str around after.id, just remove the str and remove the quotes around the id so its a bare int

modern fiber
#

@manic wing

#

See mate..

manic wing
modern fiber
modern fiber
livid jacinth
manic wing
manic wing
livid jacinth
#

Okay I've done it but he still spamming the message

manic wing
#

what is printing?

livid jacinth
#

online but 5 times and than i stopped the bot

manic wing
#

odd

cedar stream
livid jacinth
#

what is that?

manic wing
#

odd = ! even

livid jacinth
#

I do not know what this is

modern fiber
#

This emoji, protech_warning

#

948275750820265984

#

@manic wing @cedar stream

manic wing
#

put \ before it and copy it

modern fiber
#

:protech_warning:\

livid jacinth
manic wing
kind cargo
#

can anyone help me please?

manic wing
modern fiber
sick birch
# livid jacinth

This would get triggered, if say, the user stayed online but updated their profile (status)

#

You want to check both the before status and after status

modern fiber
#

Like this? @manic wing

manic wing
#

i was suggesting you use that to copy the emoji but it looks like you've copied it fine

maiden fable
#

Hi Robin

kind cargo
#

anyone help me to solve this?
File "C:\Users\sweti\OneDrive\Skrivbord\drive-download-20220301T170315Z-001\main.py", line 50, in <module>
bot.run(TOKEN).
@sick birch

kind cargo
#

ok

sick birch
#

That's only a part of it

kind cargo
#

!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.

kind cargo
maiden fable
#

Oh Swetify. Hi there!

kind cargo
#

Hi my friend! 👋👋

sick birch
# kind cargo https://paste.pythondiscord.com/wenifobuga
Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.

The error says everything

kind cargo
#

what should i enable in portal?

maiden fable
#

You need to enable members and presence intent from discord dev portal

kind cargo
#

ok ty

sick birch
#

If you're using discord.Intents.all() enable both checkboxes

#

My bad been a while

maiden fable
#

Even if u ain't doing it, turning them both on won't really hurt haha

lavish summit
#

hi, im trying to make a command that checks if the last time a user was ping was at least 1 hour ago, how could i do this?

sick birch
#

But if your bot is in high-traffic guilds probably best to leave them off to reduce computational power

slate swan
maiden fable
#

@slate swan it also works by making an instance of the class (just saying)

sick birch
lavish summit
#

thanks!

spring flax
sick birch
#

discord.Intents.all() is a class method iirc

maiden fable
sick birch
kind cargo
#

!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
#

Same with Intents.default

spring flax
#

But you don't have the intent enabled in code, just the portal, this increases it?

kind cargo
modern fiber
#

What is like command description for?

sick birch
#

That's why limiting intents to exactly what you need is the best practice to follow in production

spring flax
sick birch
maiden fable
kind cargo
#

like my whole code?

sick birch
#

Sure put it in a pastebin

kind cargo
#

Okay

modern fiber
#

How do I make it for like bot to send a command when joining?

#

onjoin how?

sick birch
#

!d discord.on_guild_join

unkempt canyonBOT
#

discord.on_guild_join(guild)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") is either created by the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") or when the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") joins a guild.

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

no way i pulled that off the top of my head

spring flax
#

That's generaly avoided though

kind cargo
#

Can iu send it in your PM @sick birch `?

sick birch
#

My dms are closed sorry, it's better to ask here anyway

kind cargo
#

Okay

#

i dont want others to steal my code..

maiden fable
#

This just feels soo satisfying pithink

sick birch
kind cargo
#

Ok

maiden fable
#

Indeed

maiden fable
#

Rip my eyes light mode

spring flax
#

Is the bot in the server you're doing guild_ids? @kind cargo

kind cargo
#

Yep

spring flax
#

Can you double check?

kind cargo
#

Yes

sick birch
kind cargo
#

I think

sick birch
#

Does your bot have the necessary permissions? e.g can add application commands

kind cargo
#

Yea

sick birch
#

You're 100% sure? You checked the box when generating the URL?

spring flax
#

Also I'd suggest passing in change_presence in bot construction, instead of making api call on_ready

kind cargo
#

if you kick the bot then invite it again does that work?

#

and i check the slash command

sick birch
kind cargo
#

Okay

maiden fable
spring flax
unkempt canyonBOT
#

class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.

This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.

This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
silk mauve
#

How to do a loop?

kind cargo
#

ty so much for the help @sick birch ❤️ keep doing the things you doing! Amazing

silk mauve
#

Like a command task loob?

modern fiber
#

I don't see the command when I do /

spring flax
silk mauve
spring flax
silk mauve
#

Thamks

kind cargo
#

@sick birch i got one more erorr.

sick birch
#

Yes?

kind cargo
#

!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.

kind cargo
spring flax
#

Mind showing the code?

sick birch
#

hmm that's odd

#

never seen that "unknown interaction" one before

kind cargo
#

Oh

#

That's weird act

maiden fable
#

U should do interaction.defer first. It's totally random acc to me and is fixed by doing inter.defer for me

quick gust
#

yes

maiden fable
#

Yup

kind cargo
#

Okay

#

Where should i add it? what line?

spring flax
kind cargo
#

okay

spring flax
#

the default time you have to respond is three seconds but if you do defer you get 15 minutes

kind cargo
#

Oh damn

spring flax
kind cargo
#

but where should i type it?

spring flax
#

the first line in the command, i guess

kind cargo
#

ok

#

so i paste this first interaction.defer

spring flax
#

why aren't you passing in any kwargs? msg = await interaction.original_message()

kind cargo
#

what i dont really understand

#

@maiden fable

#

where should i paste "interaction.defer"

spring flax
#

if you want to use interactions i suggest moving out of discord.py and perhaps using disnake

kind cargo
#

ok

spring flax
kind cargo
#

so first in the whole code?

livid jacinth
#

Does anyone know why my bot sends the message several times and how I fix this?

modern fiber
#

I tried disnake.SlashCommand too

#

(ignore caps, not sure how i did it in the code)

kind cargo
#

@spring flax

spring flax
#

yes?

kind cargo
#

or above where

spring flax
#

i honestly have no idea how discord slash commands are

@bot.slash_command(
    name = "swish" , 
    usage="/swish" , 
    description = "Command for making payment" ,
    guild_ids=GUILD_IDS ,
    default_permission = False
)
@permissions.has_role("Tillgång")
async def swish(ctx:discord.ApplicationContext , namn: str, nummer: str , belopp: str):
    interaction = await ctx.respond(f"Processing payment request from {ctx.author.mention} to {namn}. Amount: {belopp}.....")
    msg = await interaction.original_message()
    payment = utils.Payment(namn,nummer,belopp,msg.created_at,msg.id)
    
    await msg.channel.send(file = discord.File(fp=payment.mp4))

    payment.close()

This makes it look like two seperate functions

kind cargo
#

Okay....

spring flax
#

not my code

cloud dawn
#

This looks very weird

spring flax
#

yes, that's what i thought

#

yeah like i said before i don't know if you saw this but discord.py's development has been stopped so maybe consider switching libs disnake may be the best move because of how similar it is

halcyon sparrow
#

Do you guys prefer channel perms or guild perms for moderation commands?

modern fiber
#

Can somebody help me? My slash commands aren't working. Im new to slash commands anyways.

livid jacinth
#

What do you mean

#

And how i can do it

left crater
#

put a return keyword

#
  await ctx.send("yay")
  return```
manic wing
#

just put return on the same line as the await

left crater
#

oh yeah

manic wing
#

saves a line of code

long blade
#

how can i send a custom emoji?

#

ive tryed like <:Name:id> it dont wowrk

left crater
#

.

#

@long blade

long blade
#

yes#

left crater
#

<:emojiname:emoji_id>

long blade
#

yes ive tried that

livid jacinth
long blade
#

it sends :name:

#

@left crater why dose it do that?

left crater
#

await ctx.send("<:emojiname:emoji_id>")

#

did u do this?

long blade
#

sort of

#

i did it in a embed @left crater

left crater
#

i think is the same thing im not sure

#

@sick birch

long blade
#

yeah i think it is

swift acorn
#

So I can use @commands.guild_only() for commands.

But how do I disable events in Dms

left crater
#

!code

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.

livid jacinth
#
@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == 628201511259865107:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("IDK")
        return
left crater
#

do return await channel.send("idk")

long blade
flat solstice
#

Is there anything particular broken about this command? I can't seem to get it to work without providing a channel even tho I have a check for channel being nonepy @checks.is_admin() @commands.command(description = "Make me say something.", usage = "echo [channel] <message>", hidden = False) async def echo(self, ctx, channel: Optional[discord.TextChannel] = None, *, content: str): channel = ctx.channel if channel is None else channel await ctx.message.delete() await channel.send(content, allowed_mentions = discord.AllowedMentions(everyone = False))

modern fiber
#

It doesn't pop up when I use /, help please.

livid jacinth
modern fiber
slate swan
left crater
long blade
#

dont worrie

slate swan
left crater
slate swan
slate swan
modern fiber
#

oh ok

#

this one good?

slate swan
#

no

#

it must be in the bot constructor

left crater
#

@modern fiber

modern fiber
modern fiber
slate swan
left crater
slate swan
livid jacinth
slate swan
livid jacinth
#

Yes

slate swan
#

btw is that your id?

livid jacinth
#

Yes? why ask that?

modern fiber
#

I did both, @slate swan @left crater, invited the bot again with scopes, added this "client = commands.Bot(command_prefix='p!', intents=intents, test_guilds=[948245926290538506])" but still I doesn't see the command when I do /?

slate swan
modern fiber
slate swan
#

can i see your whole code?

modern fiber
slate swan
#

the msg wasnt for you and no

modern fiber
#

Oh okay. So can you help please..

#

I don't know whats wrong. Been trying for over a hour.

slate swan
#

slash commands dont have context lmao

modern fiber
#

wdym context lmao?

slate swan
#

ctx?

modern fiber
slate swan
#

ctx means context

sage otter
#

I mean that depends. Some libraries have SlashContext.

modern fiber
slate swan
modern fiber
#

just help me for god shake why nobody knows whats wrong

#

i've been trying for more than a hour

slate swan
#

what lib

modern fiber
slate swan
livid jacinth
#

Does anyone know how I can fix that the bot spams the message?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == 628201511259865107:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
modern fiber
#

How do I make something like variable, so person can type !setchannel "CHANNEL ID" and then later I can use that channel for like logging or shit

left crater
#

json or SQL

#

SQL is probably the better choice

slate swan
tidal hawk
modern fiber
native wedge
#

how to use external emoji in embed ???

swift acorn
flat solstice
#

Is this the correct way to fetch a channel?py announcements = await self.bot.fetch_channel(data[31])bc I keep getting this error even tho the column that data is calling has a channel ID in it

swift acorn
#

I think I just used await bot.get_channel(Channel ID)

slate swan
#

horrible explanation on my end

swift acorn
#

Is the bot in the server which has that custom emoji?

slate swan
#

donkey is the emoji in a title?

cloud dawn
native wedge
native wedge
slate swan
#

emojis and mentions can't be in any titles

swift acorn
#

They should work in feild titles, they do for me at least

slate swan
#

they don't for me

flat solstice
modern fiber
#

How do I set it so player can set an argument (example: !channelset ID) and then later, when I code something, I can use that argument for let's say example logging channel?

native wedge
#

here is real string, sorry i cannot change @cloud dawn

native wedge
#

when i type that it change automaticlly

swift acorn
#

Let me go try use a custom emoji in a feild title

native wedge
#

:usercoin:

#

see it change

cloud dawn
slate swan
modern fiber
cloud dawn
livid jacinth
#

Does anyone know how I can fix that the bot spams the message?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
swift acorn
cloud dawn
native wedge
#

this in a field title so idk why not me work

modern fiber
cloud dawn
slate swan
cloud dawn
swift acorn
cloud dawn
swift acorn
modern fiber
slate swan
swift acorn
native wedge
swift acorn
swift acorn
native wedge
#

OMG i found the solution

cloud dawn
native wedge
#

i have to do
:cool_emoji_name: and it return its

modern fiber
#

How do I make it?

cloud dawn
modern fiber
#

You need to pay or some?

tidal hawk
#

Whenever I run a bot it says: Interaction has already been acknowledged. & This command has just been synced. although I have set test_guilds in the main file, which shouldn't make them global.

cloud dawn
# modern fiber You need to pay or some?

Big bots -> PostgeSQL + asyncpg
Small bots -> SQLite + aiosqlite
Json based syntax -> MongoDB + Motor

No, were here to help people and solve problems, not to code entire database structures/ bots

modern fiber
#

for databases, Im new to it 😂

cloud dawn
modern fiber
#

This is what I currently have, basically, I need it so this ID can be changed with command.

modern fiber
slate swan
cloud dawn
cloud dawn
modern fiber
livid jacinth
modern fiber
#

I mean, my bot is kind of this.. protection bots things. So one "protect-logs" or smth like that channel wouldn't be bad.

#

So how can I do that for example?

cloud dawn
modern fiber
#

to get a channel with that name

native wedge
#

how do i make If Else statements in a command? they dont seem to work for me / i dont know how to do it

cloud dawn
livid jacinth
# cloud dawn Do you got the full error?

That the is full log
code, fname = _get_code_from_file(run_name, path_name)
File "C:Programs\Python\Python39\lib\runpy.py", line 242, in _get_code_from_file
code = compile(f.read(), fname, 'exec')
File "c:\bot.py", line 339
])
^
SyntaxError: invalid syntax

flat solstice
native wedge
# cloud dawn Could you provide some code?

this is horrible code but this is my attempt to do it inside a command

if moderator == "1":
                real_moderator = "Moderator"
        elif moderator == "2":
                real_moderator = "Elder Moderator"
        else:
                real_moderator = False```
and then i try to display ```real_moderator``` in an embed
#

i feel like im doing something wrong, any help ?

cloud dawn
cloud dawn
cloud dawn
livid jacinth
cloud dawn
cloud dawn
cloud dawn
modern fiber
#

Basically, so that bot makes a channel with the name upon joining - with setting a permissions (so only like admins can see it?) and it uses that channel for the logging purposes.

cloud dawn
native wedge
#

you do you, it is not needed to do that

cloud dawn
unkempt canyonBOT
#

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

A shortcut method to [`Guild.create_text_channel()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.create_text_channel "discord.Guild.create_text_channel") to create a [`TextChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel "discord.TextChannel") in the category.
tidal hawk
#

Does somebody have a idea, why my slash commands disappear after using one

livid jacinth
cloud dawn
tidal hawk
#

No.

modern fiber
tidal hawk
#

Wouldn't be asking then @cloud dawn

modern fiber
#

What should I put in the brackets of "getchannel"

cloud dawn
livid jacinth
native wedge
cloud dawn
cold sonnet
cloud dawn
native wedge
livid jacinth
cloud dawn
cold sonnet
#

I see, moderator is this
moderator = response.json()["moderator"]

rough finch
#

Why does it say command not found?

@bot.command()
async def abc(ctx):
    if ctx.author_id == 700061502089986139:
        discord.Member.add_roles(ctx.authot_id, 906166247497027645, reason=None, atomic=True)
        await ctx.send("Успешно")
    else:
        await ctx.send("Не доступно")```
native wedge
#

wow im stupid wtf

tacit horizon
#

how to add author_id
like !add @tacit horizon

cold sonnet
#
  1. replace discord.Member with an instance of it
  2. it's ctx.author.id, not ctx.author_id and not ctx.authot_id
  3. you do not need reason and atomic in your add_roles()
  4. your 906166247497027645 has to be a role object, not the id
  5. you don't have a member argument in add_roles
cloud dawn
whole shoal
#

Guys rate my bot


@client.event
async def on_guild_join(guild):
    await guild.leave()
cold sonnet
#

10/10

whole shoal
#

Ayyyyy tysm

tidal hawk
tacit horizon
#
@client.command(pass_context = True)
async def add(ctx,user : discord.Member):
```how to get the member id from there
cold sonnet
whole shoal
cold sonnet
#

and please remove pass_context

tacit horizon
#

ok

cold sonnet
#

unless you use dpy v1

cloud dawn
cloud dawn
livid jacinth
cloud dawn
modern fiber
tidal hawk
#

I register these using a testing mode.

cloud dawn
tidal hawk
#

Even if I register them globally, they shouldn't appear in the first place (for atleast 1 hour)

flat solstice
cloud dawn
tidal hawk
cloud dawn
modern fiber
tidal hawk
cloud dawn
# tidal hawk ..

I'm assuming you got the command prefix for debug commands. Do those work?

livid jacinth
cloud dawn
native wedge
#

can i put emojis in Author Name ?

modern fiber
cloud dawn
tidal hawk
native wedge
#

can i put custom emojis in Author Name ?

cloud dawn
modern fiber
#

Kind of-?

cloud dawn
#

That's not how it works 😅

modern fiber
#

I thought im supposed to lol..

#

ok so how it works 😂

cold sonnet
native wedge
#

embed

#

sorry real question is can i put custom emoji in embed area named Author Name

cold sonnet
#

well if you just use ctx.author.name and then pass a custom emoji to the string

#

you can get an emoji with

livid jacinth
native wedge
#
if moderator == 1:
                real_moderator = f"![moderator](https://cdn.discordapp.com/emojis/948308112610328637.webp?size=128 "moderator") {username}"
        elif moderator == 2:
                real_moderator = f"![eldermoderator](https://cdn.discordapp.com/emojis/948308112564178994.webp?size=128 "eldermoderator") {username}"
        else:
                real_moderator = f"{username}"
name = real_moderator```
cold sonnet
#

there I have to check...

cloud dawn
unkempt canyonBOT
#

await create_text_channel(name, *, reason=None, category=None, position=..., topic=..., slowmode_delay=..., nsfw=..., overwrites=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Creates a [`TextChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel "discord.TextChannel") for the guild.

Note that you need the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to create the channel.

The `overwrites` parameter can be used to create a ‘secret’ channel upon creation. This parameter expects a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") of overwrites with the target (either a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") or a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")) as the key and a [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/master/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite") as the value.

Note

Creating a channel of a specified position will not update the position of other channels to follow suit. A follow-up call to [`edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel.edit "discord.TextChannel.edit") will be required to update the position of the channel in the channel list...
kind cargo
#

@sick birch can u help me>?

cold sonnet
cloud dawn
native wedge
#

how do i make commands case insensitive
example: TEST!test and test!TEST are the same

cloud dawn
unkempt canyonBOT
#

Whether the commands should be case insensitive. Defaults to False. This attribute does not carry over to groups. You must set it to every group if you require group commands to be case insensitive as well.

cold sonnet
#

!d discord.ext.commands.Bot.case_insensitive

#

god

cloud dawn
#

First :p

cold sonnet
#

:C

cloud dawn
#

You're not the only one having the api docs on speed dial.

whole shoal
#

😆

cold sonnet
#

you what

#

my process:
🧠 -> ⌨️ -> discordapi

whole shoal
cloud dawn
left crater
#

be big brain

whole shoal
#

Are you using 3 monitors?

cold sonnet
#

client having get_emoji but not guild

cloud dawn
whole shoal
#

Ohh damn that's cool

cold sonnet
cloud dawn
#

The res of this picture is insane lol 6560x2560

velvet tinsel
slate swan
#

is it possible to have same callback function for multiple buttons after subclassing ui View

cold sonnet
#

my monitors are not lined up

cloud dawn
whole shoal
#

Don't tell me u sit surrounded by 6 monitors

left crater
#

figure it out then

cloud dawn
kind cargo
#
    interaction = await ctx.respond(f"Bearbetar betalningsbegäran från {ctx.author.mention} to {namn}. Amount: {belopp}.....")```
Anyone help me with this?
whole shoal
cold sonnet
#

what's the error

#

you forgot the error part :c

kind cargo
cloud dawn
slate swan
#

is it possible to have same callback function for multiple buttons after subclassing ui View

cloud dawn
cold sonnet
#

the guy I critisized vanished

whole shoal
cold sonnet
#

how do you write that

#

Criticised

cloud dawn
kind cargo
#

!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.

cold sonnet
kind cargo
#

@cold sonnet

cloud dawn
whole shoal
#

O

cold sonnet
#

mind showing the whole command?

cloud dawn
#

That's not that high right?

kind cargo
cold sonnet
#

yeah

#

that unknown interaction error is weird

kind cargo
#

right me pls if there is any errors

cold sonnet
#

ctx don't even have respond

kind cargo
#

oh

#

lol

cold sonnet
#

oh cuz it's ApplicationContext

kind cargo
#

yea

cold sonnet
#

well I have no idea what that has

kind cargo
#

Okay

cold sonnet
#

that's from the 3rd party library, right?

#

yeah that was a dumb question

#

try replacing respond with reply and see what happens

#

I strongly doubt ApplicationContext doesn't inherit from Context

#

error?

#

error handler?

final iron
#

Variable names should be in snake_case, not camelCase

cold sonnet
#

not u

final iron
#

Your variables are written in camelCase, they should be snake_case

slate swan
#
async def on_member_join(member):
    embed = discord.Embed(colour=0x7fd364, description=f"ברוכים הבאים לשרת ScarLor {len(list(member.guild.members))} member!")

    embed.set_thumbnail(url=f"{member.avatar_url}")
    embed.set_author(name=f"{member.name}", icon_url=f"{member.avatar_url}")
    embed.set_footer(text=f"{member.guild}", icon_url=f"{member.guild.icon_url}")
    embed.timestamp = datetime.datetime.utcnow()

    embed.add_field(name="ID:", value=member.id)
    embed.add_field(name="Guild name:", value=member.display_name)

    embed.add_field(name="Created at:", value=member.created_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))
    embed.add_field(name="Joined at:", value=member.joined_at.strftime("%a, %#d %B %Y, %I:%M %p UTC"))

    channel = client.get_channel(id=948215514734424064)

    await channel.send(embed=embed)
    role = get(member.guild.roles, name="Member")
    await member.add_roles(role)```
#

any one can help me fix that

cold sonnet
#

well member is a required arg that is missing

#

run
.avatar @slate swan

#

with the ping

kind cargo
#

!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.

cold sonnet
#

and there is an error, why you noping

#

that's what your code is

#

be honest

#

did you copy that code

#

try
await ctx.send(ctx.author.avatar)

cloud dawn
#

In the .send() do embed=embed_obj

cold sonnet
#

instead of "avatar"

#

update dpy

#

pip install github link which I never remember

#

that installs stable

#

that's 1.7

#

master is 2.0, which isn't on pip

night quartz
#

Hey I need some help , it is not a Discord bot but it is a telegram bot

#

I dont know if it counts

cold sonnet
cold sonnet
night quartz
#

where can I ask for help then?

velvet tinsel
cold sonnet
night quartz
velvet tinsel
cold sonnet
#

yes

#

don't matter

#

well maybe if your pip is 3.6

#

you might wanna specify that you wanna install it with the right python version

#

that's above 3.8

#

remove the space between - and U

#

phone messes with me, Imma throw it out the window

#

ey, that's not the dpy installation, me got nothing to do with that

#

cannot find command git

#

why do you need it anyways

#

pip install -U git+https://github.com/Rapptz/discord.py

#

git command

#

pip install -U git+https://github.com/Rapptz/discord.py

#

now me wondering what the -U is for

#

pip install git+https://github.com/Rapptz/discord.py

cold sonnet
#

me too

#

caeden help

manic wing
#

you need git cli installed so that it can retrieve the files from the github

#

so go install github cli @slate swan

cold sonnet
#

alr

manic wing
#

bro

#

google git cli and install it

manic wing
#

if its installed then the pip install should work

#

well not really

#

you want to install the 2.0

#

so you would need to specify that

modest plover
#

I'm tryna make a welcome command inn disnake but it doesnt work

@InteractionBot.event
    async def on_member_join(self):
        """Fires off a welcome message on user join."""
        welcomeEmbed = disnake.Embed(
            title = f"Welcome!",
            description = "Shitter >:)"
            )
        await inter.response.send_message(embed = welcomeEmbed)
manic wing
#

just install disnake instead

modest plover
#

issue raised on interactionbot

#

pip install disnake

manic wing
#

now use disnake instead of discord

modest plover
neat pagoda
#

dictionary for python3?

manic wing
#

w h || a || t

neat pagoda
#

!d dictionary

kind cargo
#

can anyone much abt slash commands

neat pagoda
#

lol

kind cargo
#

somebody that can slash commands can you help.

manic wing
#

yes

#

well all you need to do is replace disnake with discord

#

import discord disnake
embed = discorddisnake.Embed

#

get what im doing? replace discord with disnake

kindred epoch
#

?

manic wing
#

can I suggest learning python taking a break?

tepid tiger
#

what is the best way to make bot 24/7 online? is there a web page that can you suggest?

alpine furnace
#

The cool thing is, these bots will run on literally anything

tepid tiger
#

if there would be a web page domain? can i do that?

slim ibex
alpine furnace
#

There’s one for $10 a year and they accept crypto if you don’t have PayPal or cc

#

🤷‍♂️

#

Anything works

modern fiber
#

Hey guys, so about this line.

channel = client.get_channel(801446246954827808)
    await channel.send(f"{member} has been **banned** by {ctx.author} for **{reason}**!")

Since I'm making it a public bot, how can I made it so it gets the channel by it's name, not the ID?

alpine furnace
#

This is in the ban event handler? Look at the docs

#

The object that that’s called with includes a reference to guild

modern fiber
modern fiber
#

I just need it so it takes the channel with the name I typed, not the ID.

#

How do I do that?

#
channel = client.get_channel(name=?)
#

Or? Something like that.

modern fiber
#

No man, it doesn't have to do anything with ban. Ignore the other lane

alpine furnace
#

You can’t do that, unfortunately

modern fiber
modern fiber
#

you can get the channel, if not, create one

alpine furnace
#

Loop through all the channels in the guild and check if it exists

modern fiber
#

Exactly. How?

livid jacinth
#

How can i stop that the bot spam the message into the channel?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
        pass
alpine furnace
kindred epoch
#

!d disnake.utils.get

unkempt canyonBOT
#

disnake.utils.get(iterable, **attrs)```
A helper that returns the first element in the iterable that meets all the traits passed in `attrs`. This is an alternative for [`find()`](https://docs.disnake.dev/en/latest/api.html#disnake.utils.find "disnake.utils.find").

When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.

To have a nested attribute search (i.e. search by `x.y`) then pass in `x__y` as the keyword argument.

If nothing is found that matches the attributes passed, then `None` is returned.

Examples

Basic usage...
modern fiber
kindred epoch
alpine furnace
#

Yeah, or just for channel in guild.channels: if channel.name == … and isinstance(channel, TextChannel):

kindred epoch
#

thats useless when you have utils.get

alpine furnace
modern fiber
#

And what next?

modern fiber
#

lol

alpine furnace
#

Attrs are kwargs

kindred epoch
#

you literally did the same thing for muted_role

modern fiber
alpine furnace
#

Look at the type hints

#

It’s literally the same thing

livid jacinth
#

How can i stop that the bot spam the message into the channel?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
        pass
kindred epoch
#

it has what you need?

native wedge
#

how do i make it so
if it reaches else, make it like do nothing and continue the thing

cold sonnet
alpine furnace
#

😛

cold sonnet
#

?

#

just use discord.utils.get

#

!d discord.utils.get

unkempt canyonBOT
#

discord.utils.get(iterable, **attrs)```
A helper that returns the first element in the iterable that meets all the traits passed in `attrs`. This is an alternative for [`find()`](https://discordpy.readthedocs.io/en/master/api.html#discord.utils.find "discord.utils.find").

When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.

To have a nested attribute search (i.e. search by `x.y`) then pass in `x__y` as the keyword argument.

If nothing is found that matches the attributes passed, then `None` is returned.

Examples

Basic usage...
cold sonnet
#

pass guild.channels as the first arg, name="blabla" as the kwarg

alpine furnace
#

I know

#

That’s what was said above

native wedge
#

why doesnt my emoji work in Author Name?

modern fiber
#

not embed, the normal ctx

#

it doesn't work

livid jacinth
#

How can i stop that the bot spam the message into the channel?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
        pass
final iron
native wedge
rotund creek
#

Can you have nultiple task.loop

final iron
#

Yes

rotund creek
#

So its error with my code

#

Thanks

void elm
#

is there a better way of doing this?

rotund creek
#

@final iron

#

Why is my tasks.loop not working

#

If I paste my code into my first tasks.loop it works

#

Not the second

velvet tinsel
# void elm

why are you doing "Team".lower() and stuff

final iron
# void elm

Can you show a screenshot of the entire function?

rotund creek
#

Oh im dumb

final iron
#

I don't understand what you're doing

rotund creek
#

I have to start the task

void elm
velvet tinsel
rotund creek
#

variableName

void elm
#

I meant for the "elif" statements

void elm
rotund creek
#

Why

void elm
rotund creek
#

Cringe

final iron
#

Can you show what variable is?

#

I have no idea what you're doing

unkempt canyonBOT
#

Hey @void elm!

It looks like you tried to attach file type(s) that we do not allow (.zip). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.

Feel free to ask in #community-meta if you think this is a mistake.

final iron
#

I'm still super confused

tidal hawk
#

What's the best way to create reminders in Discord?
I thought about storing each reminder in json...

tidal hawk
#

Yeah, that's why im asking a better method

sick birch
#

Use a database

tidal hawk
#

Like how am i supposed to create it in aiosqlite

#

oh

sick birch
#

You can store the UNIX timestamp

#

3 columns, reminder ID, user ID, and timestamp

tidal hawk
#

reminder id?

sick birch
#

yes, generate a random UUID

void elm
sick birch
#

if True: will always execute so you can get rid of the whole thing

void elm
sick birch
#

These 2 are equivalent:

if True:
  print("Hello, world")

vs

print("Hello, world")
#

Oh I see

sick birch
void elm
#

run command files but yes

tidal hawk
sick birch
#

You could do that yeah

#

What might be more efficient is to store the message ID

tidal hawk
#

but what is UUID for

sick birch
#

To identify a reminder

rotund creek
#

Why is channel none

#

The channel exists

sick birch
#

Fetch it by ID rather than name

rotund creek
#

Alr ill try that thanks

rotund creek
#

@sick birch its still nonr

sick birch
#

Can we see the updated code?

rotund creek
#

Yea

livid jacinth
#

How can i stop that the bot spam the message into the channel?

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
        pass
rotund creek
#

Sry about photos

#

On 2 devices

sick birch
#

Why not just guild.get_channel(id) or await guild.fetch_channel(id)

#

That way you're getting from the internal cache

rotund creek
#

Oh ok

kindred drum
#

yo TypeError: '<' not supported between instances of 'float' and 'datetime.datetime' the code is py if str(payload.emoji) == str(Giveaway_Items[i]['Emoji']) and time.time() < datetime.datetime.fromisoformat(e_time):

#

not sure why i get the error

sick birch
#
time.time() < datetime.datetime.fromisoformat(e_time)

You're comparing 2 different objects

kindred drum
#

time.time isn't a date time object?

sick birch
#

Let me check if it is

#

Looks like it's a float which matches up

livid jacinth
#

How can i stop that the bot spam the message into the channel?
I tryed that the bot send a message to an channel if a specific person comes online. But if the person comes online the bot spam the message permanently.

@bot.event
async def on_member_update(before, after):
    if str(after.status) == "online" and after.id == MYID:
        channel = bot.get_channel (941209391917568000) 
        await channel.send("idk")
        pass
sick birch
#

You're comparing a float to a datetime.datetime object

#

You can't compare primitive datatypes to objects

kindred drum
#

ah how do I convert it

#

datetime.time.time

sick birch
#

You need to figure out what common format makes the most sense for your specific use-case

kindred drum
#

?now = datetime.datetime.now()

sick birch
#

That also returns a datetime object

#

But if you replace time.time() with datetime.datetime.now() you should be able to compare them

#

(I think, I haven't worked with the datetime library all that much)

kindred drum
#

now < datetime.datetime.fromisoformat(e_time):

#

(:

frank tartan
#

How can I add the bottom part to my embeds?

sick birch
#

embed.set_footer(...)

frank tartan
sick birch
#

!d discord.Embed.set_footer

unkempt canyonBOT
#

set_footer(*, text=Embed.Empty, icon_url=Embed.Empty)```
Sets the footer for the embed content.

This function returns the class instance to allow for fluent-style chaining.
frank tartan
#

O

sick birch
#

like a so

frank tartan
left crater
#

how can i send a file in an embed?

sick birch
pliant gulch
#

!local-file

unkempt canyonBOT
#

Thanks to discord.py, sending local files as embed images is simple. You have to create an instance of discord.File class:

# When you know the file exact path, you can pass it.
file = discord.File("/this/is/path/to/my/file.png", filename="file.png")

# When you have the file-like object, then you can pass this instead path.
with open("/this/is/path/to/my/file.png", "rb") as f:
    file = discord.File(f)

When using the file-like object, you have to open it in rb mode. Also, in this case, passing filename to it is not necessary.
Please note that filename can't contain underscores. This is a Discord limitation.

discord.Embed instances have a set_image method which can be used to set an attachment as an image:

embed = discord.Embed()
# Set other fields
embed.set_image(url="attachment://file.png")  # Filename here must be exactly same as attachment filename.

After this, you can send an embed with an attachment to Discord:

await channel.send(file=file, embed=embed)

This example uses discord.TextChannel for sending, but any instance of discord.abc.Messageable can be used for sending.

left crater
#

thanks

frank tartan
hoary cargo
#

Timestamp

sick birch
#

Hm I'm not sure if discord timestamps are valid at the footer

frank tartan
left crater
hoary cargo
frank tartan
pliant gulch
pliant gulch
#

The name of the file

left crater
#

but i have like 60

sick birch
#

Pick the one you want to send

#

Oh i just saw you want random

#

If that's in a JSON you can load it and random.choice()

#

if not you can get all the files in a folder (one containing all of your images) and random.choice() that too

left crater
#

what do i put for filename?

sick birch
#

Use os.listdir() to get a list of all files in a folder

left crater
#

ok

sick birch
#

In your case get all the files in your nft folder

left crater
#

i did that

#

and it works

#

and it sends

sick birch
#

Or since it looks like you have all the files neatly arranged,

f"\path\to\nft\folder\images{random.choice(range(60))}.jpg"
left crater
#

but i want it to send in an embed

sick birch
halcyon sparrow
#

Is there any way I test my kick command? I don't have anyone to test it on

left crater
#

invite a bot

#

then kick him

halcyon sparrow
#

Alright brb. The library I'm using doest have tutorials on it and I'm not very good at documentation understanding

left crater
#

@sick birch files = discord.File(f"C:\Users\nikit\Downloads\nft\images{randnum}", filename=f"image{randnum}.jpg") nfts_Emb.set_image(url=) i did this and i have no clue what to put for the url

sick birch
#

attachment://image.png

left crater
#

wdym by attachment?

sick birch
#

Or the name of the file you're going to send

#

attachment://<filename>

#

It would be easier if you just did

files = discord.File(..., filename="image.jpg")
sick birch
left crater
#

oh yeah

scarlet aurora
#
class Commands(commands.Cog):

    def __init__(self, bot):
        self.bot = bot

    def get_quote():
        response = requests.get("https://zenquotes.io/api/random")
        json_data = json.loads(response.text)
        quote = json_data[0]['q'] + " - " + json_data[0]['a']
        return(quote)

    @commands.Cog.listener()
    async def on_message(self, bot, message):
        if message.author == bot.user:
            return
        await bot.process_commands(message)

    @commands.command()
    async def help(self, ctx):
        embed = discord.Embed(
            title=f"Commands",
            description=f"""
    >help (shows this command)
    >quote
    >hello
    >cmds
    >tictactoe (mention) (mention)
    >slap (mention)
    >cf (coinflip)
    >rule (1-4)
    """,
            # embed.set_thumbnail("./tmgmidvitelogonowords.png", url)
            colour=0xffffff)

        await ctx.send(embed=embed)

def setup(bot):
    bot.add_cog(Commands(bot))```

cog file ^^

```py
@bot.event
async def on_ready():
    bot.load_extension("cogs.maincommands")
    bot.load_extension("cogs.status")```

main file ^^ 

Why are my commands not defined?
slim ibex
#

oh no. loading cogs in on ready

sick birch
scarlet aurora
final iron
slim ibex
#

but why (quote)? just do return quote?

slate swan
slate swan
slim ibex
#

thats what im saying

slate swan
#

loll

sick birch
sick birch
slate swan
#

and why use json.loads?

#

just use the json method requests has

sick birch
#

The funniest part is we've found every issue except what they asked for 😂

slim ibex
#

LMAO

#

true

scarlet aurora
#

i fixed the problems

sick birch
#

That was fast

slate swan
sick birch
#

Can we see the new & updated code?

sick birch
#

I'm guessing that's a direct result of all the other issues

slate swan
#

¯_(ツ)_/¯

slim ibex
#

someone come to ot channel

slate swan
#

why

slim ibex
#

got question about js/ts

slate swan
slim ibex
#

you don't have to subclass help command, but its recommended

sick birch
final iron
slate swan
#

random module

sick birch
#

Just pick a random number between 1-100, add % to the end of it

slim ibex
# sick birch sure what's up

so i wanna be a backend developer mainly and I think I'm going to focus mostly on backend dev with rust and c#. But, I know I probably should learn JS in the process (which I already know some JS). I just wanted to know if the difference between TS and JS is that big to warrant me using TS over JS

sick birch
slim ibex
#

yeah thats what i thought

final iron
#

What's the difference between js and ts?

slate swan
#

yeah and use .randint

slim ibex
#

type system

sick birch
slate swan
#

?

sick birch
#

Also generics, and a lot of other features

scarlet aurora
#

random.randint()

sick birch
#

Let's not take away from the channel topic, I think if you all want to discuss this further I would be more than happy to in one of the OT channels

slim ibex
scarlet aurora
#

u need to fill the ()

slate swan
#

!e

print(__import__("random").randint(0, 100))
unkempt canyonBOT
#

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

50
scarlet aurora
#

yeah

slate swan
#

really need to add the start😔

scarlet aurora
#

my commands still aren't defined

vast gale
#

we don't add characters

sick birch
#

str() and add

scarlet aurora
#
class Commands(commands.Cog):

    def __init__(self, bot):
        self.bot = bot

    @commands.command()
    async def help(self, ctx):
        embed = discord.Embed(
            title=f"Commands",
            description=f"""
    >help (shows this command)
    >quote
    >hello
    >cmds
    >tictactoe (mention) (mention)
    >tmg
    >slap (mention)
    >cf (coinflip)
    >rule (1-4)
    """,
            # embed.set_thumbnail("./tmgmidvitelogonowords.png", url)
            colour=0xffffff)

        await ctx.send(embed=embed)```
cog file ^^
```py
@bot.event
async def on_ready():
    bot.load_extension("cogs.maincommands")
    bot.load_extension("cogs.status")```
main file ^^
vast gale
#

error?

scarlet aurora
#
discord.ext.commands.errors.CommandNotFound: Command "help" is not found```
slate swan
scarlet aurora
#

sooo, my actual problem?

slim ibex
#

docstrings are laid out

scarlet aurora
#

ik but i prefer it laid out in the code so i have an idea of what it will look like

scarlet aurora
slate swan
scarlet aurora
#

yes

#
    bot.add_cog(Commands(bot))```
#

at the bottom of the cog file ^^

unkempt canyonBOT
#

@slate swan :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 3
002 |     import discord.ext import commands
003 |                        ^^^^^^
004 | SyntaxError: invalid syntax
left crater
#

what

scarlet aurora
left crater
#

oh

final iron
left crater
scarlet aurora
final iron
#

Nice job leaking your token

green bluff
#

oops

scarlet aurora
#

bro ur token is there

green bluff
#

im not really experienced

#

with voice channels

#

any help

final iron
scarlet aurora
final iron
#

Name it bot

final iron
final iron
#

You'll have an extremely hard time without any prior python knowledge

scarlet aurora
#

i know how to define stuff, it's already defined, can u tell me how to define the error i'm having

final iron
#

Function names should be in snake_case, not camelCase

left crater
#

sir why are u using replit

green bluff
final iron
#

No

green bluff
#

cause im on my school laptop and specs r garbage

#

like all school laptops r

#

¯_(ツ)_/¯

scarlet aurora
left crater
#

thats fair