#discord-bots

1 messages · Page 564 of 1

hasty iron
#

means the next arguments are keyword arguments

slim whale
#

@slate swan do u know ??

left wind
#

ah ok

slate swan
slim whale
hasty iron
#

!d discord.Member.guild_permissions

unkempt canyonBOT
#

property guild_permissions: discord.permissions.Permissions```
Returns the member’s guild permissions.

This only takes into consideration the guild permissions and not most of the implied permissions or any of the channel permission overwrites. For 100% accurate permission calculation, please use [`abc.GuildChannel.permissions_for()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.GuildChannel.permissions_for "discord.abc.GuildChannel.permissions_for").

This does take into consideration guild ownership and the administrator implication.
kindred epoch
#

@slim whale ok so i found a way, if you do ctx.author.guild_permissions.adminstrator it will return true or false, if its true then just send Adminstrator as the text

#

if its false then ig dont?

slim whale
#
perm_string = ', '.join([str(p[0]).replace("_", " ").title() for p in user.guild_permissions if p[1]])
    embed.add_field(name="Guild permissions", value=f"{perm_string}", inline=False)```i found this code, how i can change it to make it send only the highest value?
hasty iron
#

wow that’s bad code

kindred epoch
#

wyf

slate swan
#

yeah

slim whale
#

<Permissions value=8589934591> i did user.guild_permissions and the bot send this

slim whale
slim whale
slim whale
pliant gulch
#

Whats with all the join string stuff

#

You can just cast permission to dict then use .keys()

kindred epoch
hasty iron
slate swan
slim whale
#

yes but i want that the bot checks ur permissions and send the highest one u have

hasty iron
#

bruh

slim whale
#

xd

kindred epoch
#

so random

slim whale
#

ik

#

sorry guys

slate swan
#

how to fix pls


    @commands.command(name="profile2")
    async def _profile(self,ctx,member: discord.Member=None):
        if not member:
            member = ctx.author
        pfp = member.avatar_url
        membermention = ctx.author.mention
        ages = ['15', '16']
        memberroles = [role.name for role in member.guild.roles]
        age = [i for i in ages if i in memberroles] # contains all "age" roles
        if not age: # if they dont have any age roles
          text = 'No role'
        elif age[0] == '15':
          text = '15 years underage'
        elif age[0] == '16':
          text = '16'
          
        embed=discord.Embed(title=f"**Roleplay Finder**", description=f"**Discord User**: {membermention} | {member} ", color=0xffffff)
        embed.set_thumbnail(url=(pfp))
        embed.add_field(name="Verification", value="Verified", inline=True)
        embed.add_field(name="Age", value=text, inline=True)
        embed.add_field(name="Literacy", value="Semi-Lit", inline=True)
        with open('blacklist.json', 'r') as file:
            file = json.load(file)
        if str(member.id) in file:
            embed.add_field(name="__BLACKLISTED__", value="This user is blacklisted.", inline=False)
        await ctx.send(embed=embed)

doesn't change the text in the embed no matter if i have no roles, the 15 role or the 16 role
it always just sends the first possible value e.g 15, then if i edit 15 to a random number like 99 it'll send 16, then if i edit both to random numbers it says

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range

#

Any way to make a shut down command?

magic stump
#
    return await getattr(self._user, x)(*args, **kwargs)
AttributeError: 'ClientUser' object has no attribute 'create_dm'```
#
@client.event
async def on_member_join(member):

    global hasloo


    haslo = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

    haslo2 = 5

    hasloo = "".join(random.sample(haslo,haslo2))

    id_channel = int(828011225292079124)


    await client.get_channel(id_channel).send(f"**{member.name}, użyj komendy** `!verify (kod)`\n**Twój kod weryfikacyjny to** \n`{hasloo}`")```
slim whale
#
@bot.command()
async def badges(ctx, user: discord.Member = None):
  if user.premium == True:
    await ctx.send("si")
  else:
    await ctx.send("no")```i want to check if the user has nitro, it doesnt detect premium, im using this docs https://discordpy.readthedocs.io/en/latest/api.html?highlight=profile#discord.Profile
slim whale
#

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'premium'

#

do i need any import or something?

kindred epoch
#

how did you use the command?

#

did you do !badges @kindred epoch

slate swan
#

How to @ you

#
await ctx.send('Contact @i-Jaypro-i#5791')
kindred epoch
#

@kindred epoch 🤷‍♂️

slate swan
#

no

#
await ctx.send('Contact @i-Jaypro-i#5791')
#

that doesnt @ the person tho

kindred epoch
slate swan
#

how?

kindred epoch
#

!d discord.ext.commands.Bot.get_user

unkempt canyonBOT
slate swan
#

thanks

magic stump
#
    return await getattr(self._user, x)(*args, **kwargs)
AttributeError: 'ClientUser' object has no attribute 'create_dm'``````py
@client.event
async def on_member_join(member):

    global hasloo


    haslo = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

    haslo2 = 5

    hasloo = "".join(random.sample(haslo,haslo2))

    id_channel = int(828011225292079124)


    await client.get_channel(id_channel).send(f"**{member.name}, użyj komendy** `!verify (kod)`\n**Twój kod weryfikacyjny to** \n`{hasloo}`")```
slim whale
#

i need to ping myself?

#

no

slate swan
kindred epoch
slate swan
#

ok

kindred epoch
delicate flax
#

Hello. I have an error there. But, this thing is working on my first bot but not on my second one... 🙂

from discord.utils import get
async def on_message(message):
    server = bot.get_guild(885811553474072576)
    category = get(server.categories, name = "DM")  # get the support category```
```category = get(server.categories, name = "DM")  # get the support category
AttributeError: 'NoneType' object has no attribute 'categories'```
slate swan
#

really need help with detecting a users roles and placing it in an embed in #help-popcorn if possible

#

code i have doesn't seem to work

#

how to fix pls


    @commands.command(name="profile2")
    async def _profile(self,ctx,member: discord.Member=None):
        if not member:
            member = ctx.author
        pfp = member.avatar_url
        membermention = ctx.author.mention
        ages = ['15', '16']
        memberroles = [role.name for role in member.guild.roles]
        age = [i for i in ages if i in memberroles] # contains all "age" roles
        if not age: # if they dont have any age roles
          text = 'No role'
        elif age[0] == '15':
          text = '15 years underage'
        elif age[0] == '16':
          text = '16'
          
        embed=discord.Embed(title=f"**Roleplay Finder**", description=f"**Discord User**: {membermention} | {member} ", color=0xffffff)
        embed.set_thumbnail(url=(pfp))
        embed.add_field(name="Verification", value="Verified", inline=True)
        embed.add_field(name="Age", value=text, inline=True)
        embed.add_field(name="Literacy", value="Semi-Lit", inline=True)
        with open('blacklist.json', 'r') as file:
            file = json.load(file)
        if str(member.id) in file:
            embed.add_field(name="__BLACKLISTED__", value="This user is blacklisted.", inline=False)
        await ctx.send(embed=embed)

doesn't change the text in the embed no matter if i have no roles, the 15 role or the 16 role
it always just sends the first possible value e.g 15, then if i edit 15 to a random number like 99 it'll send 16, then if i edit both to random numbers it says

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: IndexError: list index out of range

delicate flax
#

🤔

#

So how can I do?

primal fox
#

double check the ID

delicate flax
#

oh....

#

I am so stupid

#

I copied the code.....

primal fox
#

I figured lol

delicate flax
#

And forgot to change id......

#

.................

#

Thank you

#

🙂

rare saddle
#

Why doesn't it see him?

primal fox
#

because you're defining emb1 when condition A is met, but only sending it when condition B is met, so it's catch-22

#

define emb1 after the else:

hasty iron
#

or before both conditions

primal fox
#

seems they're only sending it in the else though ;P

rare saddle
hasty iron
primal fox
slate swan
#
        ages = ['15','16']
        memberroles = [role.name for role in member.guild.roles]
        age = [i for i in ages if i in memberroles] # contains all "age" roles
        if not age: # if they dont have any age roles
          text = 'No role'
        elif age[0] == '15':
          text = '15 years underage'
        elif age[0] == '16':
          text = '16'
#

how do i make this so memberroles is checking the users assigned roles instead of roles that exist on the server

#
@client.event
async def on_message(message):
    if client.user.mentioned_in(message):
        embed = discord.Embed(description="command prefix: `,`\nfor help, use: `,help`\ninvite alone: `,invite`", color=color)
        await message.channel.send(embed=embed)
    else:
        await client.process_commands(message)```


How could I make this not send the embed if @ here or @finite fableveryone is in the message
dapper cobalt
#

Check if the message.content is equal to the client.user.mention instead.

slate swan
#

how could i do that lmfao

dapper cobalt
#

2 steps.
1 - use your brain to process what I said.
2 - use the same exact brain you used in step 1 to think of doing step 1.

slate swan
#

so
if message.content == client.user.mention:?

#

!d discord.FFmpegPCMAudio

unkempt canyonBOT
#

class discord.FFmpegPCMAudio(source, *, executable='ffmpeg', pipe=False, stderr=None, before_options=None, options=None)```
An audio source from FFmpeg (or AVConv).

This launches a sub-process to a specific input file given.

Warning

You must have the ffmpeg or avconv executable in your path environment variable in order for this to work.
rare saddle
#

How to make a condition that if the author of the message is a bot, then do nothing

dapper cobalt
unkempt canyonBOT
#

property bot```
Equivalent to [`User.bot`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.bot "discord.User.bot")
rare saddle
dapper cobalt
dapper cobalt
#

What?

rare saddle
dapper cobalt
#

!d discord.Message.author

unkempt canyonBOT
slate swan
#

is there a way to make invites for all te servers the bot is in?

rare saddle
outer violet
#

I have two separate cooldown messages so how do I make one cooldown message only for that specific command

dapper cobalt
#

!d discord.Member.bot

unkempt canyonBOT
#

property bot```
Equivalent to [`User.bot`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.bot "discord.User.bot")
placid skiff
#
embed.set_thumbnail(self.bot.user.avatar.url)
TypeError: set_thumbnail() takes 1 positional argument but 2 were given

Ok so, this is in a cog and i checked in the debug, it is a string D_D

dapper cobalt
#

You didn't pass url.

#

!d discord.Embed.set_thumbnail

unkempt canyonBOT
#

set_thumbnail(*, url)```
Sets the thumbnail for the embed content.

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

Changed in version 1.4: Passing [`Empty`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed.Empty "discord.Embed.Empty") removes the thumbnail.
slate swan
placid skiff
#

bro self.bot.user.avatar.url

#

really it need url= lol?

slate swan
#

yes

rare saddle
placid skiff
primal fox
dapper cobalt
# rare saddle I do not understand how I can make this condition, sorry
name = "SEIF WESSAM"

name returns a str object. A str object has a method called lower(). So, if you do

print(name.lower())

It will print seif wessam.

Now you have here something similar. message.author returns discord.Member, and discord.Member has an attribute called bot. Now if you do

print(message.author.bot)

It will either print True or False depending on if the user is a bot or not.

rare saddle
placid skiff
# rare saddle That is, the condition should be like this?

No bro
Have you studied python before getting into discord.py?

message.author.bot returns a Bot object. In python every value that is equal to None returns false in an if statement, this is applied to class objects too
So if the author is a bot and you type if message.author.bot this statement returns true, else, if the author is not a bot, it returns false

#

!e

value = ""
print (True if value else False)
unkempt canyonBOT
#

@placid skiff :white_check_mark: Your eval job has completed with return code 0.

False
slate swan
placid skiff
slate swan
slate swan
slate swan
fierce terrace
#

how would I get a bot to send a random with a keyword?

#

So someone uses a command to input a term and a gif is sent relating to it

placid skiff
slate swan
#

yea, it still doesnt return a bot object

#

why would it

#

Although idk why you'd need it since there's already /giphy

coral marlin
#

Isn't discordpy being discontinued?

slate swan
#

It is

coral marlin
#

That's sad

slate swan
slate swan
#

Somewhat, until discord does breaking changes or adds too many new stuff

silent ermine
placid skiff
slate swan
slate swan
#

so it will still work in the future? just no updates right?

silent ermine
slate swan
slate swan
silent ermine
#

and it will stop working

slate swan
#

Currently? Yeah for the most part it's still good

#

Yeah

slate swan
placid skiff
lunar helm
#

hey guys

slate swan
lunar helm
#

im trying to add a leveling feature to my discord bot and i already did so but my role stuff is pretty trash

slate swan
#

The docs are really easy to understand, so don't blame them, just saying

slate swan
lunar helm
#

im thinking about deleting all the code for adding and removing level roles but i'd like some help so i can make it better

slate swan
#

Im out im going to learn about dbs and disnake for the future later boys and girls have a good day or night

placid skiff
silent ermine
lunar helm
#

well

#

here's the thing

lunar helm
#

i was going to use sqlite but then i have a limit to how many roles a server could add

slate swan
#

Actually yeah ig you may have some problems with finding stuff in the docs, that's why I always use my rtfm or docs command

silent ermine
lunar helm
#

json (ik it's bad) actually had the advantage of allowing ♾️ roles

#

this isn't a personal bot

silent ermine
lunar helm
#

yeah but let me show you the issue i have

slate swan
#

    @commands.command(name="profile")
    async def _profile(self,ctx,member: discord.Member=None):
        if not member:
            member = ctx.author
        pfp = member.avatar_url 
        membermention = ctx.author.mention
        userName = ""
        userAge = ""
        questions = [
            "Please input your name/nickname:",
            "Please input your age:"
        ]
        dmChannel = await ctx.author.send(
            "Yo will be receiving two questions. One involving your name and the other your age.")
    
        def check(message):
            return message.author == ctx.author and message.channel == dmChannel.channel
        @client.event
        async def askQuestion(question):
            await ctx.author.send(question)
            print("Waiting for reply...")
            userReply = await client.wait_for('message', check=check)
            print("User replied")
            return userReply.content
        userName = await askQuestion(questions[0])
        userAge = await askQuestion(questions[1])

gives

#
Discord Version: 1.5.1
loading Bot, Please Wait
loaded cogs.Commands
loaded cogs.Currency
Ignoring exception in command profile:
Traceback (most recent call last):
  File "C:\Users\coolb\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\coolb\OneDrive\Documents\mootbot\cogs\Commands.py", line 233, in _profile
    @client.event
NameError: name 'client' is not defined

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

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

what am i doing wrong?

silent ermine
silent ermine
slate swan
lunar helm
#

json be like


"xxxxxxxx(guild id)" {
  "5": 901614930879455252,
  "10": 901626195379109928,
  "15": 100000000000000000,
  "10000": 1000000000000000
  }
}
slate swan
lunar helm
#

with sqlite

slate swan
slate swan
silent ermine
# slate swan yes

you cant use @client.event, you have to use at @commands.Cog.listener i think

slate swan
silent ermine
lunar helm
#

i could make a make a table that has 10000 columns but that isn't very practical

slate swan
silent ermine
placid skiff
silent ermine
slate swan
silent ermine
lunar helm
slate swan
#

I don't see how what you just sent is a "learning experience"

#

You clearly have 0 knowledge of python

placid skiff
#

In fact 😂

slate swan
#

Because that's a python problem not dpy nor lib related problem

placid skiff
#

And your error doesn't even involve the database at all

silent ermine
#

@lunar helm Personally i like this tutorial for a leveling command with sqlite3 i recommend checking it out: https://www.youtube.com/watch?v=Bf2O-X4QQjU

My discord server ► https://discord.gg/BN6WaDs
(If you have any questions or just want to have a chat with us)

(Some Cool Stuff)
Nertivia ► https://nertivia.supertiger.tk/
My server in Nertivia ► https://nertivia.supertiger.tk/invites/B4tMwO

Install discord.py ► pip install discord.py or py -3 pip install discord.py
Discord.py documentation ►...

▶ Play video
slate swan
silent ermine
slate swan
#

idk nobody has made one

lunar helm
#

as someone that can't stand school copy and pasting code is helpful but i recommend you dont copy and paste a full bot only copy and paste each little part of something that way you at least learn a little bit

slate swan
silent ermine
# slate swan idk nobody has made one

My discord server ► https://discord.gg/BN6WaDs
(If you have any questions or just want to have a chat with us)

(Some Cool Stuff)
Nertivia ► https://nertivia.supertiger.tk/
My server in Nertivia ► https://nertivia.supertiger.tk/invites/B4tMwO

Install discord.py ► pip install discord.py or py -3 pip install discord.py
Discord.py documentation ►...

▶ Play video
placid skiff
slate swan
#

that playlist has got me to where im at but there is no tutorial for what i want to do now

placid skiff
#

And you can't even copy others code

placid skiff
slate swan
#

have a user respond to a question in dm then use their answer in an embed in a server

slate swan
#

aka just capture their answer, i can do the rest

silent ermine
lunar helm
silent ermine
#

basically its a Modmail report ?

#

Yea there are a lot of tutorials for that.

slate swan
slate swan
#

!d discord.ext.commands.Bot.wait_for

unkempt canyonBOT
#

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

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
silent ermine
#

i forgor how to do a mod mail but yea you can use wait_for

placid skiff
# slate swan aka just capture their answer, i can do the rest

You are tryin to find something that is already done for you
It doesn't work in this way.
Essentially your idea is very easy to do, but you don't have the knowledge necessary to do it
You have to learn, and you can't learn directly from what you want to do because is impossible to find tutorials that does specific thing
Tutorials meaning is to show you in general how something work, same goes for developing a bot

#

A tutorial can show you how you can make a bot that take parameters, then is your job to work with that parameters and do something with them

slate swan
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord.ext.commands' has no attribute 'wait_for'

#

?

#

nvm i got it working

#

i guess copy and pasting does work 😄

#

how could i get the total guild count a bot is in

#

@bot.command(name='membercount')
async def membercount(ctx):
    await ctx.send(ctx.guild.member_count)

#

i said guild count

#
@client.command()
async def servers(ctx):
    await ctx.send(f"{len(client.guilds)}")
#

AttributeError: 'Bot' object has no attribute 'guild'

normal ginkgo
#

How do I run 2 bots in the same file? (Ik I shouldn't, but I want to)

slate swan
#

!d discord.PCMVolumeTransformer

unkempt canyonBOT
#

class discord.PCMVolumeTransformer(original, volume=1.0)```
Transforms a previous [`AudioSource`](https://discordpy.readthedocs.io/en/master/api.html#discord.AudioSource "discord.AudioSource") to have volume controls.

This does not work on audio sources that have [`AudioSource.is_opus()`](https://discordpy.readthedocs.io/en/master/api.html#discord.AudioSource.is_opus "discord.AudioSource.is_opus") set to `True`.
outer violet
#

how would i put a users message in a link inside an embed?

#

so other users can jump to that message?

manic wing
#

!d discord.Message.jump_url

unkempt canyonBOT
normal ginkgo
#

Is there a way I can make my bot react to messages like this for example?

manic wing
#

those aren't reactions 🤔

slate swan
#

those are buttons

normal ginkgo
#

Yes

outer violet
normal ginkgo
#

How do I make my bot click buttons?

slate swan
#

There's examples on their github

normal ginkgo
#

Oh

outer violet
manic wing
#

do you know what ctx is?

outer violet
#

yea

manic wing
#

then what do you expect

outer violet
#

i have it ._.

@commands.command(aliases=['qu'])
    async def quote(self, ctx, message_id:int):
        msg = await ctx.channel.fetch_message(message_id)
        embed = discord.Embed(
            description=f"{ctx.message.jump_url} \n>>> {msg.content}"
        )
        embed.set_author(name=f"{ctx.message.author}", icon_url=ctx.author.avatar_url)
        embed.set_footer(text=f"Message quoted by: {ctx.author}")
        await ctx.send(embed=embed)
slate swan
#

Replace ctx.message.jump_url with msg.jump_url

slate swan
outer violet
#

no need to be rude about it

slate swan
manic wing
slate swan
#

what is it to show all members in all guilds i forgot

#

client.guild something

manic wing
#

i said discord.Message.jump_url, and you had the instance you needed, but you used ctx. That's on you.

slate swan
#

idek

slate swan
slate swan
manic wing
unkempt canyonBOT
#

property members: List[discord.member.Member]```
A list of members that belong to this guild.
manic wing
#

oh in all guilds

slate swan
#

yes

#

It'll also include bots btw

manic wing
#

!d discord.ext.commands.Bot.users

unkempt canyonBOT
slate swan
#

i know, i just need it in my status and i dont wanna do alot of work to get it

manic wing
#

you can do filter(lambda m: not m.bot, bot.users)

slate swan
#

i dont care about bots

normal ginkgo
manic wing
slate swan
#

i've been getting fucking
AttributeError: 'Bot' object has no attribute 'guild' from {len(client.guild.members)}

normal ginkgo
manic wing
#

as we said

slate swan
#

OH MY FUCKING GOD IM SO DUMB

manic wing
#

agreed.

normal ginkgo
slate swan
#

i can't even agree with you

slate swan
# normal ginkgo

The way you asked didn't point that out at all, but yeah, the emoji kwarg is what you're looking for

normal ginkgo
#

Ok

slate swan
#

how come


        variable_list = [ '903068179755069450','903068198935605318','903068209920495657']
        channel = self.bot.get_channel({random.choice(variable_list)})
        await channel.send(embed=embed)

doesn't work? it doesn't spit out any errors either. the goal is to have the message sent in 1 of 3 channels randomly chosen

pliant gulch
#

You have a list of strings, get_channel takes an integer

#

And you have two stray brackets you don't need

manic wing
#

as andy said, int the variable_list choice, and remove the {}

slate swan
#

how do i int the variable_list

manic wing
#

get_channel(int(random.choice(variable_list))), or you can just remov the ' from the indexes in the list.

slate swan
#

thanks

neon oyster
#

if i have a funtion nested in a function how would i return on both of them

manic wing
#

can you show code and expected output?

neon oyster
#

nevermind

#

i just relized what i can do

slate swan
#

how do i format it

#

the embed into this

#

from this

quiet coral
#

Hello, I have a function that gets the top 10 cryptocurrencies by market cap

import os 
import json
from requests import Session
def get_top10():
    CMC_API_KEY=os.environ.get('CMC')
    parameters={
                
                'start':1,
                'limit':5000
                }
    headers={
                'Accepts':'application/json',
                'X-CMC_PRO_API_KEY':CMC_API_KEY
                }
    session=Session()
    session.headers.update(headers)
        
    url='https://pro-api.coinmarketcap.com/v1/cryptocurrency/map'
    response=session.get(url,params=parameters)
    json_file=json.loads(response.text)['data']
    top10_rank_to_slug = {d['rank']: d['slug'] for d in json_file}
    top_10 = sorted(top10_rank_to_slug.items())[:10]
    for rank,name in top_10:
        print(rank,name)```


but in order to pass it to my discord bot the function has to return a value not print it how can I do that (I want the bot to loop through the list then return the items one by one I dont want the bot to just return the list )
```python
@client.command()
@commands.check(check_channel)
async def top10(ctx):
    await ctx.send(get_top10())
client.run(token)

how do you suggest I do that

finite fossil
#

yes

#

is there a fetch function in python like javascript and am I supposed to use nextcord to make a discord bot bc I heard discord py was discontinued

final iron
final iron
finite fossil
#

ok what's disnake

quiet coral
finite fossil
#

it returns a JSON as a string

#

https://api.github.com/ is a json and fetch() returns a string of it... then I can use JSON.parse() to convert it to an object and stuff

quiet coral
quiet coral
supple thorn
#

with buttons and slash and other things supported

boreal ravine
#

guys its just another module

#

it doesnt really matter if your using nextcord, disnake or discord.py

quiet coral
finite fossil
#

and I can't install npm

#

does it require the latest version of python or anything that repl.it doesn't have?

cloud dawn
#

Same version as discord.py
Also let's keep this topic on python.

cyan sundial
#

how do i use categories in the default help command

outer violet
#

I keep trying to @ my alt acc but it only works for me can someone help


@commands.command(aliases=['ava'])
    async def avatar(self, ctx, *, member: discord.Member = None):
        if member is None:
            member = ctx.author

            embed = discord.Embed(
                title=f"{member}'s Avatar",
                color=0x000100,
                timestamp=datetime.utcnow()
            )
            embed.set_image(url=member.avatar_url)
            await ctx.send(embed=embed)
     ```
cyan sundial
#

what

cloud dawn
cyan sundial
outer violet
#

No

cyan sundial
#

i have an avatar command ill see what ur doing wrong

outer violet
#

I’m just doing the command and @ my alt acc but it doesn’t work

cloud dawn
cyan sundial
#

on the second line

cloud dawn
#

No...

cyan sundial
#

i think

#

ok

#

im not that good with cogs

cloud dawn
#

At embed = discord.Embed(

outer violet
cloud dawn
cyan sundial
#

thats why it only works for u

outer violet
#

Yeah

cloud dawn
#

I also recommend using the or operator.

cyan sundial
#
@commands.command(aliases=['ava'])
    async def avatar(self, ctx, *, member: discord.Member = None):
        if member is None:
            member = ctx.author

        embed = discord.Embed(
            title=f"{member}'s Avatar",
            color=0x000100,
            timestamp=datetime.utcnow()
        )
        embed.set_image(url=member.avatar_url)
        await ctx.send(embed=embed)
     
```that should fix it im pretty sure
#

if i removed the right ammount

cloud dawn
#

Looks good to me.

#
        if member is None:
            member = ctx.author
``` is the same as ```py
member = member or ctx.author
lilac latch
#

How to check if a message was a DM??

slate swan
#

!d discord.DMChannel , use isinstance to check message.channel

unkempt canyonBOT
#

class discord.DMChannel```
Represents a Discord direct message channel.

x == y Checks if two channels are equal.

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

hash(x) Returns the channel’s hash.

str(x) Returns a string representation of the channel
lilac latch
lilac latch
slate swan
#

i made a ban command but it can ban people higher then the executer, how could i make it so it cant

lilac latch
slate swan
slate swan
#

did you?

slate swan
#

what im saying is,

user is role below person he's trying to ban, it bans him

what I want:
if user is lower, it sends a message saying that they can't ban them

#
@client.command(aliases=['b'])
@commands.has_permissions(ban_members = True)
async def ban(ctx, member : discord.Member, *, reason = None):
    if reason == None:
        await member.ban(reason = reason)
        await ctx.send(f"**{member}** has been banned :thumbsup: ")
    else:
        await member.ban(reason = reason)
        await ctx.send(f"**{member}** has been banned for **{reason}** :thumbsup: ")```
#

there's that if u need that

#

!d discord.Role.position , compare the top role position

unkempt canyonBOT
#

The position of the role. This number is usually positive. The bottom role has a position of 0.

Warning

Multiple roles can have the same position number. As a consequence of this, comparing via role position is prone to subtle bugs if checking for role hierarchy. The recommended and correct way to compare for roles in the hierarchy is using the comparison operators on the role objects themselves.

slate swan
#

you can get top role of member by member.top_role

#

i have never used role.position, how would i check?

boreal ravine
slate swan
boreal ravine
#

it is

boreal ravine
#

!d discord.Member.top_role

unkempt canyonBOT
#

property top_role: Role```
Returns the member’s highest role.

This is useful for figuring where a member stands in the role hierarchy chain.
boreal ravine
#

!d discord.Role.position

unkempt canyonBOT
#

The position of the role. This number is usually positive. The bottom role has a position of 0.

Warning

Multiple roles can have the same position number. As a consequence of this, comparing via role position is prone to subtle bugs if checking for role hierarchy. The recommended and correct way to compare for roles in the hierarchy is using the comparison operators on the role objects themselves.

slate swan
boreal ravine
#

Well you can compare the users' top role with the member he's trying to ban

#

like

if ... < ...:
  return
#

the dots are the member objects

slate swan
boreal ravine
#

I dont think he understood

unique breach
#

Is there anyway to use slash commands with nextcord?

boreal ravine
#

I dont think they have it you can check their discord/github though

slate swan
#

guys

boreal ravine
#

what

slate swan
#

a broblerm

boreal ravine
#

what is ti

slate swan
#

import discord
from discord.ext import commands

TOKEN = open('token.txt', 'r').read()

bot = commands.Bot(command_prefix="lk!")

class commandsbot():
@bot.command(name="hello")
async def embedm(ctx: commands.Context):
embed = discord.Embed(color=0x00ff00)
embed.title = "Hello!"
embed.description = f'{ctx.author.mention},Ok! Maybe Boy or girl!'
await ctx.send(embed=embed)

class botevents():
@bot.event
async def on_message(message):
if message.content == "hello":
await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
await message.author.create_dm()
await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
@bot.event
async def on_ready():
print('Loki In Charge as @{0.user}'.format(bot))

bot.run(TOKEN)

#

this is code

#

eroor is

#

only hello is working

#

lk!hello isnt working

#
import discord
from discord.ext import commands

TOKEN = open('token.txt', 'r').read()

bot = commands.Bot(command_prefix="lk!")

class commandsbot():
    @bot.command(name="hello")
    async def embedm(ctx: commands.Context):
        embed = discord.Embed(color=0x00ff00)
        embed.title = "Hello!" 
        embed.description = f'{ctx.author.mention},Ok! Maybe Boy or girl!'
        await ctx.send(embed=embed)

class botevents():  
    @bot.event
    async def on_message(message):
        if message.content == "hello":
            await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
            await message.author.create_dm()
            await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
    @bot.event
    async def on_ready():
        print('Loki In Charge as @{0.user}'.format(bot))

bot.run(TOKEN)
#

!e

import discord
from discord.ext import commands

TOKEN = open('token.txt', 'r').read()

bot = commands.Bot(command_prefix="lk!")

class commandsbot():
    @bot.command(name="hello")
    async def embedm(ctx: commands.Context):
        embed = discord.Embed(color=0x00ff00)
        embed.title = "Hello!" 
        embed.description = f'{ctx.author.mention},Ok! Maybe Boy or girl!'
        await ctx.send(embed=embed)

class botevents():  
    @bot.event
    async def on_message(message):
        if message.content == "hello":
            await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
            await message.author.create_dm()
            await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
    @bot.event
    async def on_ready():
        print('Loki In Charge as @{0.user}'.format(bot))

bot.run(TOKEN)
unkempt canyonBOT
#

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

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | ModuleNotFoundError: No module named 'discord'
boreal ravine
slate swan
#

in commands

#

on_message(message):
if message.content == "hello":

#

this is one

#

this is onother

#

@boreal ravine got it?

#

oh boy !

valid perch
#

Why are they in classes lol?

slate swan
#

first no classes

valid perch
#

They shouldn't be, unless you mean to make them cogs

slate swan
#

even no working

#

then tried with classes

#

even no working

valid perch
#

Yea well, we can help with that

slate swan
#

thanks bro

valid perch
#

Get rid of your class's then you need to add this to your on_message. Actually read what Im linking to and youll see

slate swan
#

btw my bot name is loki-laufeyson

boreal ravine
#

ok?

slate swan
#

await bot.process_commands(message)

#

ok

#

@valid perch

You meant like this?
@bot.event
async def on_message(message):
    if message.content == "hello":
        await message.channel.send(f"Hey Man! Whats up?{message.author.mention}")
        await message.author.create_dm()
        await message.author.dm_channel.send(f'Hi {message.author.name}, Hope you are Fine!, Isnt? {message.author.mention}!')
        await bot.process_commands(message)
valid perch
#

Outside of the if generally, but otherwise yea

slate swan
#

Indent it out of your if statement

#

okthanks

#

just with pair to async def??

#

Otherwise it will execute commands only if the message is heloo

#

of pair with if?

#

No, same level as the if statement

#

ok

#

That's basically Python knowledge

#

ok

#

im a fool

#

and how do we make our bot to responds to dms?

boreal ravine
#

check the type of the message channel using isinstance()

slate swan
#
elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:
#

like itthen

#

how to respongd to specific message?

@kayle
#

@boreal ravine

#

@boreal ravine last help that im gonna ask you please

#

@boreal ravine
@boreal ravine

#

Spamming will just make people mad and ignore you

#

ok

#

You won't get more attention by spamming

#

...??

#

it sends to random people

boreal ravine
#

!d discord.on_member_update

unkempt canyonBOT
#

discord.on_member_update(before, after)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") updates their profile.

This is called when one or more of the following things change:

• nickname

• roles

• pending...
boreal ravine
#

hm

crystal wind
#

Hey I was wondering if there’s a way to optimize an embed message edit, by modifying a single field.

#

Do I have no choices but to create a brand new embed despite using the same title and descriptions?

slate swan
#
if status in status
slate swan
crystal wind
#

Yeah, I thought so. So there’s no other way then?

slate swan
#

please i payforwinrar

#

Not that I know

#

please help me with this

crystal wind
#

kk

#

Thanks!

valid perch
slate swan
#

for a specific message please?

#

pleaseeeeeeeeeeeeeeeeeeeeeeee

#

@slate swan help

#

im so concerned

slate swan
unkempt canyonBOT
#

set_field_at(index, *, name, value, inline=True)```
Modifies a field to the embed object.

The index must point to a valid pre-existing field.

This function returns the class instance to allow for fluent-style chaining.
slate swan
# slate swan with
elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:

how to respond to specific message?
@slate swan

#

this

true forge
#

how could we check if a user reacted with a particular emoji in a message?

pale zenith
#

or an on_raw_reaction_add as a @bot.event

#

!d discord.ext.commands.Bot.wait_for

unkempt canyonBOT
#

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

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
pale zenith
#

discord.Client.wait_for works the same

true forge
#

oh i see

#

ty

pale zenith
#

np

#

note its an attribute of your bot/client instance of course

boreal ravine
#

Whats status supposed to be

pale zenith
#

yeah.... if statement makes absolutely no sense lol

boreal ravine
#

the if statement will always return true

#

Well

#

you're gonna get TypeError: argument of type 'CustomActivity' is not iterable

slate swan
#

yeh then idk lol

boreal ravine
#

does after refer to member?

#

well I rtd and before, after refers to the member object being BEFORE and AFTER they changed something

#

try activity.name and put that before checking if something is in it

#

wait @slate swan you're supposed to be using on_presence_update

#

!d discord.on_presence_update

unkempt canyonBOT
#

discord.on_presence_update(before, after)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") updates their presence.

This is called when one or more of the following things change:

• status

• activity

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

ohhh

#

ight

boreal ravine
#

if status in after.activity:
put activity before status and change after.activity to after.activity.name

#

Also maybe use the equality operator

#
slate swan
#

!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
#
   if status in after.activity.name:```
#

Shouldn't start by making a Discord bot if you don't even know what an equality operator is

#

ok

slate swan
boreal ravine
slate swan
#

Oh yeah and

x = str("x")

is pretty much unnecessary, just do

x = "x"
#

ight

crystal wind
slate swan
#

!d help

#

@full rampart

#

@regal thicket

#

@slate swan

#

@green vault

#

@rare prism

tawdry perch
#

What the

slate swan
#

i want help

valid perch
#

Because thats gonna help

tawdry perch
#

Indeed spamming will make people help ya

slate swan
#

please help!!!!!!!

valid perch
#

What do you want help with?

tawdry perch
#

Just tell the problem?

valid perch
#

Heh, thats the funny part. No

slate swan
#

how to make qa bot respond with dms

#

elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:

#

done this then?

tawdry perch
#

We can't help without knowing that what you need help with, no matter what

slate swan
#

or any other

tawdry perch
#

Ah nvm

valid perch
slate swan
#
elif isinstance(message.channel, discord.channel.DMChannel) and message.author != bot.user:```
valid perch
slate swan
#

ok

#

means

#

continue please

#

with elif

valid perch
#

Continue what, what do you want to do?

slate swan
#

isinstance

valid perch
#

Why isinstance?

slate swan
#

okhang on

tawdry perch
#

Why do you need it?

valid perch
#

Lolol

#

Explain your problem here

#

What do you want

boreal ravine
worthy wagon
#

Anyone know if it's color=discord.Red()

#

or some other thing for coloring

#

W

boreal ravine
#

wtf

#

!d discord.Colour.red

unkempt canyonBOT
#

classmethod red()```
A factory method that returns a [`Colour`](https://discordpy.readthedocs.io/en/master/api.html#discord.Colour "discord.Colour") with a value of `0xe74c3c`.
valid perch
old crest
#

Help

boreal ravine
boreal ravine
worthy wagon
boreal ravine
#

👍

old crest
#

so im trying to make a league football bot wanna see the codes i have so far?

boreal ravine
#

sure

old crest
#

ok

#
import os
import discord
import asyncio
from datetime import datetime, timedelta
from discord.ext import commands



intents = discord.Intents.all()
#in the line below replace all of the prefixes with their emojis for each team (DONT REMOVE THE + PREFIX)
bot = commands.Bot(command_prefix=["+"], intents=intents, case_insensitive = True)
bottomimage = "https://media.discordapp.net/attachments/898576566299262987/902595014314557460/rainbow-border.gif" 
bot.remove_command('help')
demands = 883837534919065604 #demands cannel
transactions = 883837534919065603
commandschannel = 883837534747103285
offers = 883837534919065602
clocktime = 1800 #Dont Change this
clocktimetwo = "30 minutes" #Dont Change this
maxroster = 12
```league = "YFA" #Their league name
threedemands = "3 Demands" 
```twodemands = "2 Demands"
```onedemand = "1 Demand" 
```blacklistrole = "No Demands" 
```waitlist = "📙 Waitlist" 
```suspendedrole = "⚠️ Suspended"
boreal ravine
#

your code

#

is a pain to see

old crest
#

lol

old crest
#

is this a good code for the league bot

boreal ravine
#

I mean sure

#

Not for me to judge

old crest
#

k

#

oop the bot just turned on

true forge
#
@client.event 
async def on_reaction_add(self, reaction):
  if str(reaction.emoji) == '😀':
    await reaction.add("😀")
#

this isnt woring

boreal ravine
#

only the 2.0 stuff (views, buttons)

true forge
#

i was trying to do if a person reacts with 😀 then bot also reacts with 😀

boreal ravine
true forge
#

to react to a message ig

boreal ravine
#

it cant add a reaction to a reaction

#

hm lemme rtd

true forge
#

im new to python so i dont know much

#

just practicing things

boreal ravine
#

your function isn't in a class

true forge
#

oh

#

so how can i fix that code?

boreal ravine
#

!d discord.on_reaction_add takes 2 parameters

unkempt canyonBOT
#

discord.on_reaction_add(reaction, user)```
Called when a message has a reaction added to it. Similar to [`on_message_edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_message_edit "discord.on_message_edit"), if the message is not found in the internal message cache, then this event will not be called. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") instead.

Note

To get the [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message") being reacted, access it via [`Reaction.message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Reaction.message "discord.Reaction.message").

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

Note

This doesn’t require [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") within a guild context, but due to Discord not providing updated user information in a direct message it’s required for direct messages to receive this event. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") if you need this and do not otherwise want to enable the members intent.
slate swan
#

Getting error client not defined using this

#

commands.when_mentioned_or("sbs!")(client, message)

#

Any suggestions

#

I am using cogs

boreal ravine
true forge
#

it says 'reaction' object has no attribute 'add'

slate swan
#
async def get_prefix(client, message): ##first we define get_prefix
      try:
        pref = await fetch_prefix(message.guild.id)
        print(pref)
        return commands.when_mentioned_or(*prefixes)(client, message)
      except:
         return
commands.when_mentioned_or("sbs!")(client, message)
    ```@boreal ravine
boreal ravine
boreal ravine
boreal ravine
slate swan
#

It is not In any class

boreal ravine
true forge
marsh dust
#

do any of u guys know how to.. make an application bot for dms...(pythn)

boreal ravine
true forge
#

oh

#

so hows that thing possible?

unkempt canyonBOT
boreal ravine
slate swan
boreal ravine
#

!d discord.Message.add_reaction

unkempt canyonBOT
#

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

Add a reaction to the message.

The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").

You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
slate swan
#

@boreal ravine check full code

true forge
#

oh

boreal ravine
#

hm

magic stump
#
    return await getattr(self._user, x)(*args, **kwargs)
AttributeError: 'ClientUser' object has no attribute 'create_dm'``````py
@client.event
async def on_member_join(member):

    global hasloo


    haslo = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

    haslo2 = 5

    hasloo = "".join(random.sample(haslo,haslo2))

    id_channel = int(828011225292079124)


    await client.get_channel(id_channel).send(f"**{member.name}, użyj komendy** `!verify (kod)`\n**Twój kod weryfikacyjny to** \n`{hasloo}`")```
true forge
#

NameError: name add_reaction is not defined

boreal ravine
boreal ravine
true forge
#

k

boreal ravine
#

do you understand though

slate swan
#

What to do it works perfectly till now but now it stopped working any idea how to correct it

boreal ravine
#

you saying "K" means you don't understand what to do from experience 🤷‍♂️

true forge
boreal ravine
#

@slate swan wait your code isn't inside the function

slate swan
#

I don't know I restarted bot and now it is throwing errors

#

Means

boreal ravine
true forge
#

so its like fetching the message first to add reaction?

boreal ravine
#

!d discord.Message.add_reaction

unkempt canyonBOT
#

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

Add a reaction to the message.

The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").

You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
spiral frigate
#

is this a mistake or not

Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001FB809E7A60>
true forge
#

understood now tysm

boreal ravine
spiral frigate
#

my code


    @commands.command(name= "мемчик")
    async def meme(self, ctx):

        des = random.choice(["Я пришёл разнести вас по личным причинам.", "Неправильный не я… Неправильный весь этот мир.", "Я просто подвигами маюсь.", "Выбор – это всегда только компромисс или эгоистичный ход в своих интересах. Только так.", "В конце концов, весь мир вращается вокруг меня!", "Терпеть не могу пороховой огонь, \n он понятия не имеет о хороших манерах.", "Если вам нечего делать, \n то не надо делать это здесь!", "Дураки любят высокие места.", "Сейчас мы покажем, на что способны… БЕЖИМ!!!", "Мы дойдем до самого конца! А потом еще куда-нибудь…", "Враньё – это путь к популярности."])

        embed = discord.Embed(
            title="Цитата:" ,
            description=f"{des}",
            colour = 0x694c5f
            )

        reddit = asyncpraw.Reddit(
        client_id='client_id',
        client_secret='client_secret',
        user_agent='user_agent'
        )

        subreddit = await reddit.subreddit("animemes")
        post_to_pick = random.randint(1, 100)

        async for submission in subreddit.hot(limit=post_to_pick):
            pass

        embed.set_image(url=submission.url)
        
        await ctx.reply(embed = embed)
boreal ravine
#

hm

hasty iron
#

dont make a Reddit instance every command invokation

#

make it outside the command

hasty iron
boreal ravine
#

it is?

finite fossil
#

I have a question am I allowed to "hack" my own bot bc I used javascript to initially make it, but my node is old || and I can't update it for a lot of reasons || which means I can't use discord js v13 so I decided to login to my bot with python as well...

#

and disnake python has v13 features right?

#

hopefully?

slate swan
#

help?

#

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

tawdry perch
boreal ravine
# slate swan

!d discord.on_member_join only takes one parameter

unkempt canyonBOT
#

discord.on_member_join(member)``````py

discord.on_member_remove(member)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") leaves or joins a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").

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

How would you check if a channel name already exist and if it doesnt exist the bot will create a channel with that name?

I made this bcz I thought this was how it was supposed to be made, but it doesnt work. It gives me an error and says get reference doesnt exist in channel = get(guild.text_channels, name='bot-chat'). I was sure that was a thing

@bot.command()
async def setup(ctx):
    guild = ctx.guild
    channel = get(guild.text_channels, name='bot-chat')
    q_channel = get(guild.text_channels, name='quotes')

    if channel is None:
        await guild.create_text_channel('bot-chat')
        channel = discord.utils.get(ctx.guild.channels, name="bot-chat")
        channel_id = channel.id
        print(channel_id)
    else:
        await ctx.send("there is already a channel in this server with the name 'bot-chat'")
    if q_channel is None:
        await guild.create_text_channel('quotes')
        channel = discord.utils.get(ctx.guild.channels, name="quotes")
        channel_id = channel.id
        print(channel_id)
    else:
        await ctx.send("there is already a channel in this server with the name 'quotes'")
slate swan
#
        variable_list = [ 903068179755069450,903068198935605318,903068209920495657 ]
        channel = self.bot.get_channel(random.choice(variable_list))
        dmChannel = await ctx.author.send(
            "Your request was sent in channel {channel}")
        await channel.send(embed=embed)

how can i get {channel} to show as the chosen channel inside the text?

boreal ravine
#

by making a slash command/view

unkempt canyonBOT
#

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

boreal ravine
#

views are literally buttons

#

!d discord.User

#

Weird

#

cool

finite fossil
finite fossil
boreal ravine
#

uhm

#

depends on what ur gonna use

finite fossil
boreal ravine
slate swan
slate swan
#

Can somebody help me with this :

@bot.command()
async def help(ctx):
  emb=discord.Embed(title="Help commands :PikaPika:", description="Mod commands : ")
  emb.add_field(name=":text: Mute", value="[example](https://cdn.discordapp.com/attachments/893126341422104646/903204835531321345/2021-10-28_115132.png)")

bc when i click to the example it gives me this error on the site
https://cdn.discordapp.com/attachments/893126341422104646/903208186650177536/unknown.png
https://cdn.discordapp.com/attachments/903058192756518943/903207462000263168/unknown.png

#

pls someone

boreal ravine
#

try making a new image

slate swan
#

it works

#

thanks

boreal ravine
#

👍

slate swan
#

How can I get the users who clicked the button?

maiden fable
#

Breh

#

Not documented. Nvm

jade tartan
#

Hi i have this reaction that wont give the role to the user when they react to it

#

here is my code

slate swan
#

Hello how to get all the perms from ctx.guild.me.guild_permissions?
I am expecting this output-

View Channels - True
Read Message History - True
Move Members - False
.....

manic wing
#

you can do it manuallypy perms = ctx.guild.me.guild_permissions view_channels = perms.view_channels read_message_history = perms.read_message_history move_members = perms.move_memmbers or iter throughpy for k in perms: print(k)

vale narwhal
#

How i can convert discord's message string into int?

slate swan
#

Wat

#

you cant convert "hello" to 1

vale narwhal
#

Like messages return "1" but i want it to be 1

slate swan
#

Ohh

#

Do this

vale narwhal
#

Ahem

slate swan
#

if msg.content.is_digit():
#code here

vale narwhal
#

I don't want it to check if it is int or not

slate swan
#

Then?

vale narwhal
#

The question is how can i convert "1" string to 1 int

slate swan
#

int()

vale narwhal
#

Alright

slate swan
#

Ok....

#

@manic wing can I get the list of all the keys?

manic wing
#

just print perms

slate swan
#

Like this....

[View channels, Move members...]

#

Only the keys

manic wing
#

print([k for k in perms])

#

or print(dir(perms))

slate swan
#

Ummm ok

manic wing
#

returns ```py
[('create_instant_invite', True), ('kick_members', True), ('ban_members', True), ('administrator', True), ('manage_channels', True), ('manage_guild', True), ('add_reactions', True), ('view_audit_log', True), ('priority_speaker', True), ('stream', True), ('read_messages', True), ('send_messages', True), ('send_tts_messages', True), ('manage_messages', True), ('embed_links', True), ('attach_files', True), ('read_message_history', True), ('mention_everyone', True), ('external_emojis', True), ('view_guild_insights', True), ('connect', True), ('speak', True), ('mute_members', True), ('deafen_members', True), ('move_members', True), ('use_voice_activation', True), ('change_nickname', True), ('manage_nicknames', True), ('manage_roles', True), ('manage_webhooks', True), ('manage_emojis', True), ('use_slash_commands', True), ('request_to_speak', True)]

#

that is [k for k in ctx.me.guild_permissions]

#
['DEFAULT_VALUE', 'VALID_FLAGS', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '_from_value', '_has_flag', '_set_flag', 'add_reactions', 'administrator', 'advanced', 'all', 'all_channel', 'attach_files', 'ban_members', 'change_nickname', 'connect', 'create_instant_invite', 'deafen_members', 'embed_links', 'external_emojis', 'general', 'handle_overwrite', 'is_strict_subset', 'is_strict_superset', 'is_subset', 'is_superset', 'kick_members', 'manage_channels', 'manage_emojis', 'manage_guild', 'manage_messages', 'manage_nicknames', 'manage_permissions', 'manage_roles', 'manage_webhooks', 'membership', 'mention_everyone', 'move_members', 'mute_members', 'none', 'priority_speaker', 'read_message_history', 'read_messages', 'request_to_speak', 'send_messages', 'send_tts_messages', 'speak', 'stage', 'stage_moderator', 'stream', 'text', 'update', 'use_external_emojis', 'use_slash_commands', 'use_voice_activation', 'value', 'view_audit_log', 'view_channel', 'view_guild_insights', 'voice']
``` this is the output to `dir()`
boreal ravine
#

!e

a = "5"
print(type(int(a)))
unkempt canyonBOT
#

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

<class 'int'>
slate swan
#

Lol

vale narwhal
boreal ravine
#

I wasn't I was just scrolling up

slate swan
#

@vale narwhal are you new to py?

vale narwhal
slate swan
#

Ok

vale narwhal
#

I learn python by self learning kekpoint

slate swan
#

Lol

boreal ravine
#

how do you forget nvm

slate swan
#

@vale narwhal me too

vale narwhal
#

ahem

slate swan
#

Self-learned

vale narwhal
#

My grammar is cringe ignore it

slate swan
#

Also owner of a public bot!

#

Its ok

vale narwhal
#
@name.error
async def name_error(ctx, error):
    if isinstance(error, ???)
        #extra stuff

how i can handle this error?
ValueError: invalid literal for int() with base 10: 's'

slate swan
#

for

@commands.listener
async def on_member_join(member):
```can I use```py
f"{member.id}"
```and
```py
f"{member.name}"
boreal ravine
#

yes

slate swan
#

ok cool

steady flume
#

guys, how to make prefix like pls which Dank Memer has ??

#

pls help for ex

slate swan
#
bot = commands.Bot(command_prefix="pls", intents=intents)
#

replace the pls with what you want it to be

steady flume
#

bruh, then u cant use spae after pls

slate swan
#

No..

steady flume
#

i want use space

rough ledge
#

There is strip_after_prefix kwarg for that

boreal ravine
slate swan
#

no need for the space after pls

steady flume
#

i didnt understand actually

slate swan
boreal ravine
#

!d discord.ext.commands.Bot.strip_after_prefix

unkempt canyonBOT
#

Whether to strip whitespace characters after encountering the command prefix. This allows for ! hello and !hello to both work if the command_prefix is set to !. Defaults to False.

New in version 1.7.

steady flume
#

ty guys

slate swan
#

but when I use a regular prefix like "-" it works without putting a space after

#

why is pls any different

boreal ravine
#

what

slate swan
#

did you even read what they asked

#

oh wait yeah

#

🤦‍♂️

#

my bad

steady flume
#

guys, how to turn on this functions

boreal ravine
#

¯_(ツ)_/¯

steady flume
#

i didnt understand actually

boreal ravine
steady flume
#

abobus

boreal ravine
#

classic

boreal ravine
slate swan
boreal ravine
#

pls read it first

slate swan
steady flume
#
client = Bot(command_prefix="$", intents=discord.Intents.all(), strip_after_prefix=True)
magic pond
#

how to get a users top role ?

steady flume
#

good?

steady flume
#

thank you!

boreal ravine
#

!d discord.Member.top_role

unkempt canyonBOT
#

property top_role: Role```
Returns the member’s highest role.

This is useful for figuring where a member stands in the role hierarchy chain.
tawdry perch
boreal ravine
tawdry perch
#

Oh sorry lol

magic pond
#

ok ty

boreal ravine
#

👍

magic pond
#

thts not wrking

boreal ravine
#

show me what u did

magic pond
#

wait 1sec

steady flume
#

@boreal ravine thank you very much!!

#

its work

boreal ravine
#

ok

boreal ravine
magic pond
#
     likes = likesc.get(str(ctx.author.id),0)
     embed = discord.Embed(description=f" **Balance** : {wallet_amt} \n **Bank** : {bank_amt} \n  **Level**: \n :mw_like: **Likes** : {likes}\n**Badges : **{badges} \n **Top Role**: {author.top_role}"  ,color=0xFFDF00)
     embed.set_author(name=f"{ctx.author.name}'s Profile")
     #embed.set_thumbnail(url=ctx.author.avatar.url)
     embed.set_footer(text=f'Requested By {ctx.author.name}')
     await ctx.send(embed=embed)
magic pond
#

ok

steady flume
#

i want ask last question, how to make 2 prefixs, i mean like Dank Member too, it has 2 prefixs Pls and pls

steady flume
boreal ravine
#

yes

steady flume
#

?

boreal ravine
#

yes

steady flume
#

okey, ty bro!

boreal ravine
#

👍

rare saddle
#

How to make the correct condition? What if the author of the message is a bot then do nothing?

slate swan
#

In cogs for an event is it

@commands.listener()
```or```py
@commands.event()
```?
magic pond
reef shell
#

@commands.Cog.listener iirc

slate swan
#

ok thankyou

rare saddle
#

or without message

magic pond
rough ledge
rare saddle
maiden fable
magic pond
#

how to get a users top role

reef shell
maiden fable
unkempt canyonBOT
#

property top_role: Role```
Returns the member’s highest role.

This is useful for figuring where a member stands in the role hierarchy chain.
reef shell
#

!d discord.User.bot

unkempt canyonBOT
magic pond
#

i tried tht

#

did not wrk

maiden fable
#

I mean

#

What's the error

magic pond
#

there is no error shown

maiden fable
#

Can I see some code?

magic pond
#
     userdata = badgedta.get(str(ctx.author.id),[])
     for i in userdata:
      badges+= bademoji.get(i,'')+" "
     
     wallet_amt = bank[str(ctx.author.id)]["wallet"]
     bank_amt = bank[str(ctx.author.id)]["bank"]
 
 

     likes = likesc.get(str(ctx.author.id),0)
     embed = discord.Embed(description=f" **Balance** : {wallet_amt} \n **Bank** : {bank_amt} \n  **Level**: \n :mw_like: **Likes** : {likes}\n**Badges : **{badges} \n **Top Role**: {ctx.author.top_role}"  ,color=0xFFDF00)
     embed.set_author(name=f"{ctx.author.name}'s Profile")
     #embed.set_thumbnail(url=ctx.author.avatar.url)
     embed.set_footer(text=f'Requested By {ctx.author.name}')
     await ctx.send(embed=embed)
maiden fable
#

Where u using top_role?

#

Oh nvm

magic pond
#

it should be shown in profile

rare saddle
maiden fable
magic pond
#

wait lemme get a pic

steady flume
#

how to make pagination with buttons (not emoji) ??

magic pond
#

this was without tht role thing

magic pond
maiden fable
#

Hmm

#

Weird

#

Do u have an error handler?

magic pond
#

no error shown

boreal ravine
#

that isnt an error handler

#

hm

#

@magic pond does your bot have member intents

slate swan
magic pond
#

this right ?

maiden fable
#

Ah

magic pond
#

yes it has yes it has

boreal ravine
maiden fable
#

!intents

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.

magic pond
#

it has

slim whale
#
@bot.command()
async def badges(ctx, user: discord.Member = None):
  if user.nitro == True:
    await ctx.send("si")
  else:
    await ctx.send("no")```i want the bot to say if u have nitro
magic pond
#

i sent wrong one

slim whale
#

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'nitro'

magic pond
boreal ravine
slate swan
boreal ravine
#

you can only check how long the user has nitro for

slim whale
boreal ravine
slate swan
#

Shouldn't this work with bots too?
When I invite a bot nothing is being printed.

        @commands.Cog.listener()
        async def on_member_join(member):
            print(f"{member.name} joined.")
boreal ravine
magic pond
#

so.. how to fix it ?

boreal ravine
#

since bots are member objects too

slate swan
slate swan
boreal ravine
unkempt canyonBOT
#
Not in my house!

No documentation found for the requested symbol.

slim whale
maiden fable
#

Hmm, lemme see

slate swan
#

@boreal ravine could it be something to do with my cogs

boreal ravine
#

does it work for members

slate swan
#

Haven't tried yet

slim whale
#

ik but it sends this error

  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'nitro'```
slate swan
#

I doubt it

slim whale
#

do i need any import or something?

maiden fable
#

Depreciated

#

Ahem ahem

boreal ravine
#

thats what I said

#

:|

#

since like everybody uses 1.7.3-2.0

wintry shore
#

Thats weird the api still sends data about nitro tho

boreal ravine
magic pond
#

whn i remove tht top role the cmnd works

slate swan
maiden fable
#

!d discord.Member.profile @slim whale

unkempt canyonBOT
#
Not gonna happen.

No documentation found for the requested symbol.

maiden fable
#

Wait lemme show

boreal ravine
#

profile

maiden fable
#

See this

boreal ravine
#

is decapretated

maiden fable
#

It's depreciated, also can be used only by non bot accounts

steady flume
#

guys, how to make pagination with buttons (not emoji) ??
if u can help, i will say big Thanks

slim whale
#

so how u can check if he has nitro for a user info? to check badges

boreal ravine
#

you dont

#

you cant

maiden fable
#

Yups

unkempt canyonBOT
#

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

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

New in version 2.0.
maiden fable
#

U gotta subclass that

slim whale
maiden fable
#

Add buttons, increment/decrement buttons

maiden fable
unkempt canyonBOT
#

property public_flags```
Equivalent to [`User.public_flags`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.public_flags "discord.User.public_flags")
boreal ravine
#

^

slim whale
boreal ravine
slate swan
slate swan
magic pond
#

wht is my bot working only in shash cmnds

#

till sm time back it was proper

#

are the prefix thing removed now itself

#

?

boreal ravine
#

what

#

they aren't removed

#

you probably have something blocking your commands

slate swan
#

will someone join my server and leave?

#

will someone join my server and leave?

boreal ravine
#

sure

leaden jasper
#

does a return statement in a task restart the task after the cooldown?

slate swan
#

hi guys, please tell me how to make an unban user

visual island
visual island
unkempt canyonBOT
#

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

Unbans this member. Equivalent to [`Guild.unban()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.unban "discord.Guild.unban").
leaden jasper
#

ok thats perfect

slate swan
#

!D discord.Member.ban

unkempt canyonBOT
#

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

Bans this member. Equivalent to [`Guild.ban()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.ban "discord.Guild.ban").
slate swan
#

Hallo kann mir jemand bei PyCharm CE helfen?

boreal ravine
#

what

slate swan
#

Oh sry

#

I speak english now

#

->> Hello can someone help me with PyCharm CE?

#

how can i make it so my bot sends a message telling a user that their message has too many characters instead of just going silent and putting this in console

In embed.fields.3.value: Must be 1024 or fewer in length.

boreal ravine
#

try except

#

or a commands.BadArgument error

#

idrk

reef shell
#

What's the error btw

slate swan
#

the bot does not start. i'm doing the same thing as the guy on youtube. it does not work. it constantly shows errors. I need help.

#

wait….

unkempt canyonBOT
#

Please provide the full traceback for your exception in order to help us identify your issue.

A full traceback could look like:

Traceback (most recent call last):
    File "tiny", line 3, in
        do_something()
    File "tiny", line 2, in do_something
        a = 6 / b
ZeroDivisionError: division by zero

The best way to read your traceback is bottom to top.

• Identify the exception raised (in this case ZeroDivisionError)
• Make note of the line number (in this case 2), and navigate there in your program.
• Try to understand why the error occurred (in this case because b is 0).

To read more about exceptions and errors, please refer to the PyDis Wiki or the official Python tutorial.

boreal ravine
#

Show error

boreal ravine
#

hmm env problem

#

I forgot how to solve

slate swan
visual island
magic pond
reef shell
#

Follow this one

slate swan
#

Okay

#

:))

magic pond
#

there is no error shown in console

slate swan
#

Do you think I'm stupid or the program is bugged?

#

!traceback

unkempt canyonBOT
#

Please provide the full traceback for your exception in order to help us identify your issue.

A full traceback could look like:

Traceback (most recent call last):
    File "tiny", line 3, in
        do_something()
    File "tiny", line 2, in do_something
        a = 6 / b
ZeroDivisionError: division by zero

The best way to read your traceback is bottom to top.

• Identify the exception raised (in this case ZeroDivisionError)
• Make note of the line number (in this case 2), and navigate there in your program.
• Try to understand why the error occurred (in this case because b is 0).

To read more about exceptions and errors, please refer to the PyDis Wiki or the official Python tutorial.

slate swan
# reef shell !traceback pls
  File "C:\Users\coolb\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\coolb\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\coolb\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.fields.3.value: Must be 1024 or fewer in length.```
visual island
#

you're using 2.7

magic pond
#

wht is my bot working only in shash cmnds
till sm time back it was proper
are the prefix thing removed now itself

#

anyone knows how to fix ?

slate swan
#

I‘m a german potato 😂

#

Hello guys and girls!i am new to a coding and to a python.I have a probly a noob questions.Wel here it go.I am trying to code a discord bot,basic bot with some commands like,if you type this command you get a link,daily joke and etc.My question is...do i need use some sort of database if i wish to store inputs from people,for example if a mod wana create new command via discord directly?

slate swan
#

Visual studio for now,since i have server at home so it would be self hosted bot

boreal ravine
slate swan
#

if you are trying to say something with those images,i have no idea what are you trying to say

boreal ravine
#

no?

#

that was someone else

reef shell
#

!d discord.HTTPException.text

unkempt canyonBOT
coarse compass
#

I have a command in a cog, let the command be <command_name>
When I use the default !help <command_name> on my bot, it first says No command <command_name> found then it successfully shows the command's documentation.
What do I do to prevent it from saying no command found?

slate swan
#

yea that was message for a other guy but post got removed @boreal ravine,what database do you recommend mysql or mssql?i have experiance with mssql

boreal ravine
#

whats mssql

#

.pypi mssql

#

!pypi mssql

unkempt canyonBOT