#discord-bots

1 messages ยท Page 495 of 1

boreal ravine
#

mhm

maiden fable
#

role.members.__len__()

boreal ravine
#

@languid jungle help

maiden fable
#

Imagine pinging individuals instead of the role pithink

boreal ravine
#

but

#

its gonna be a nuisance

#

rather just ping one mod with an online status

maiden fable
#

Eh, I also pinged mods in #bot-commands haha

boreal ravine
#

o.o

cerulean geyser
# boreal ravine its gonna be a nuisance

I'd recommend pinging mod role eitherway, it ensures that some active mod sees it, since online status doesn't really tell if the mod can take an action or not at the moment

cerulean geyser
#

No need to be sorry, just a headsup, we won't punish people for pinging mods unless they do it for trolling sake or something along those lines

drifting arrow
#

@boreal ravine you're working with buttons right?

drifting arrow
#

You wanna give me a quick crash course on how to use them? ๐Ÿ˜„

#

Just trying to get a basic button xD

boreal ravine
#

hm well I use py-cord lel

drifting arrow
#

oh

boreal ravine
#

Painful

maiden fable
#

Hey @drifting arrow, I can help you with buttons! (I have made a paginator myself with those in like 50 lines or something)

#

I know it can be a pain in the start, but they are F. U. N.

drifting arrow
#

Once I get the basics down I can go back to relying on the documentation lol

stuck flare
#
@commands.command(name="setstatus")
    async def setstatus(self, ctx: commands.Context, *, text:str):
        await self.bot.change_presence(activity=discord.Game(name=text))``` gives me the error command not found
drifting arrow
#

Waiting for him to press enter ๐Ÿ˜ฎ

drifting arrow
stuck flare
drifting arrow
visual island
#

should just be the same

stuck flare
#

to change the status of a bot

visual island
#

have you load the extension?

stuck flare
visual island
#

!d discord.ext.commands.Bot.load_extension

unkempt canyonBOT
#

load_extension(name, *, package=None)```
Loads an extension.

An extension is a python module that contains commands, cogs, or listeners.

An extension must have a global function, `setup` defined as the entry point on what to do when the extension is loaded. This entry point must have a single argument, the `bot`.
maiden fable
drifting arrow
visual island
#

bot.load_extension("filename")

maiden fable
stuck flare
#

A Context object is always the first parameter passed to a comman

boreal ravine
maiden fable
unkempt canyonBOT
stuck flare
#

ohh wait

maiden fable
#

(:

visual island
#

Bruh

#

im typing that

stuck flare
#

i need to load extension lol

boreal ravine
visual island
boreal ravine
#

lel

stuck flare
#

im so dumb

visual island
boreal ravine
maiden fable
boreal ravine
#

I was first

#

smh

visual island
maiden fable
boreal ravine
#

gae

visual island
maiden fable
visual island
maiden fable
#

It's just used to me typing the discord.ext.commands

visual island
#

actually yeah me too

drifting arrow
#

@maiden fable Can I put buttons inside of an embed? or is it always at the end?

maiden fable
#

And u need either an embed or a content, u can't send only Buttons/Dropdown

drifting arrow
#

๐Ÿ˜ฆ error
from discord import MessageInteraction

slate swan
#

How do I add the voice support version of discord.py into my requirements.txt? can I just do discord.py[voice]==some.version.here?

maiden fable
drifting arrow
#

cannot import name 'MessageInteraction' from 'discord'

maiden fable
#

Remove that then

maiden fable
slate swan
visual island
maiden fable
#

Ah sure then

slate swan
#

alright i'll try that out

maiden fable
visual island
maiden fable
#

"cool"

drifting arrow
#

@maiden fable is it possible to add text between each button? or define how many is on each line?
say I want <button> Click that. <button> Or this one.

maiden fable
#

They are always at the last

drifting arrow
#

Can I atleast define how many is displayed in a row? ;-;

stuck flare
#

@visual island doesnt work

drifting arrow
#

I'd much like that to be in lots of 3 not 5 xD

stuck flare
#
commands.command(name="setstatus")
    async def setstatus(self, ctx: commands.Context, *, text:str):

        await self.bot.change_presence(activity=discord.Game(name=Text))```
slate swan
drifting arrow
maiden fable
#

Anyways

#

There's a row kwarg

#

In the init of the Button

stuck flare
#

can someone help my setstatus comand is not working

#
@commands.command(name="setstatus")
    async def setstatus(self, ctx: commands.Context, *, text: str):
        await self.bot.change_presence(activity=discord.Game(name=text))```
drifting arrow
maiden fable
slate swan
normal jasper
#

guys when i make an 8 ball it only shows the first word of the question
Question By T I m N o O n e T๐ŸŒˆ
=>is
Answer By Peachy Bot :
=> I Guess No .

drifting arrow
#

Doesn't help that everything on the internet is either outdated or just not caught up

maiden fable
drifting arrow
# maiden fable Can I see your code
    @commands.command()
    async def theboard(self, ctx):
        myboard = {'7': 'Empty' , '8': 'Empty' , '9': 'Empty' ,
            '4': 'Empty' , '5': 'Empty' , '6': 'Empty' ,
            '1': 'Empty' , '2': 'Empty' , '3': 'Empty' }
        
        view = View() 
        view.add_item(Button(label= myboard['7'], custom_id=7,row=1)) 
        view.add_item(Button(label= myboard['8'], custom_id=8,row=1)) 
        view.add_item(Button(label= myboard['9'], custom_id=9,row=1))
        
        view.add_item(Button(label= myboard['4'], custom_id=4,row=2)) 
        view.add_item(Button(label= myboard['5'], custom_id=5,row=2)) 
        view.add_item(Button(label= myboard['6'], custom_id=6,row=2))
         
        view.add_item(Button(label= myboard['1'], custom_id=1,row=3)) 
        view.add_item(Button(label= myboard['2'], custom_id=2,row=3)) 
        view.add_item(Button(label= myboard['3'], custom_id=3,row=3)) 
        await ctx.send("Your board", view=view)
        
        #print(Button.callback)
        def check(m):
            return ctx.author.id == 197979859773947906
        button_callback = Button.callback
        interaction = await self.client.wait_for(button_callback)
        await ctx.send(f"you clicked button {interaction.component.custom_id}")
        await interaction.respond(content=f"you clicked button {interaction.component.custom_id}")
visual island
drifting arrow
drifting arrow
#

Ofc it's wrong. coz it's not working xD

maiden fable
#

U set the callback by subclassing Button

#

Or I have another idea

#
class MyView(View):
    @button(kwargs)
    async def button_1_click(self, inter):
        # what will happen if this button is clicked
#

Then you can make your game

#

That's how I made my paginator

normal jasper
# drifting arrow Send code
async def Pball(ctx , question):
        username = str(ctx.author).split('#')[0]
        user_message = str(ctx.message.content)
        channel = str(ctx.channel)
        eightball = ['Yes','No','Probably','Of Course','Of Course No','From my point of view , yes','100% No','I Donnow','Ask Me Later','Im Busy , Sorry ','Im sure yes','I Guess No']
        embedVar = discord.Embed(title=f"โœฆPeachy Botโœฆ\n Question By {username} ",color=0x00ff00)
        embedVar.add_field(name=f"Question By {username}", value=(f'=>{question}'),inline=False)
        embedVar.add_field(name="Answer By Peachy Bot :", value=(f'=> {random.choice(eightball)} .'),inline=False)
        await ctx.send(embed=embedVar)
        return   ```
drifting arrow
#

should it be @button or @Button? ๐Ÿค” coz i got an error with a lowercase B

drifting arrow
maiden fable
#

!d discord.ui.button

unkempt canyonBOT
#

discord.ui.button(*, label=None, custom_id=None, disabled=False, style=<ButtonStyle.secondary: 2>, emoji=None, row=None)```
A decorator that attaches a button to a component.

The function being decorated should have three parameters, `self` representing the [`discord.ui.View`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.View "discord.ui.View"), the [`discord.ui.Button`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.Button "discord.ui.Button") being pressed and the [`discord.Interaction`](https://discordpy.readthedocs.io/en/master/api.html#discord.Interaction "discord.Interaction") you receive.

Note

Buttons with a URL cannot be created with this function. Consider creating a [`Button`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.Button "discord.ui.Button") manually instead. This is because buttons with a URL do not have a callback associated with them since Discord does not do any processing with it.
maiden fable
#

There

slate swan
#

@maiden fable Sorry for ping, do you know how to seperate MemberNotFound/RoleNotFound from BadArgument since the NotFound's are inherited from BadArgument?

#

Like make an error handler for MemberNotFound that doesn't raise BadArgument

plucky shoal
#

If MemberNotFound is a subclass of BadArgument, it's not possible

maiden fable
#

Well, I don't think there's any way

plucky shoal
#

But you can check the type of the error

maiden fable
#

Was gonna say that

plucky shoal
#

if type(error) == commands.MemberNotFound :

slate swan
#

Yeah, I did that

#

But just wanted to know if there was any better way

maiden fable
#

Or I have another idea

#
if error is MemberNotFound

if error is BadArgument
slate swan
#
@commands.Cog.listener()
    async def on_command_error(self, ctx, error):
        if isinstance(error, commands.CommandOnCooldown):
            rounded = round(error.retry_after)
            embed=discord.Embed(description=f"{self.bot.cross_emote} {ctx.author.name}, this command is on cooldown. Please try again in {rounded} seconds", color=discord.Color.red())
            msg = await ctx.send(embed=embed, delete_after=4)

        elif isinstance(error, commands.MemberNotFound):
            await ctx.send(embed=discord.Embed(description=f"{self.bot.cross_emote} I could not find that member", color=discord.Color.red()))

        elif isinstance(error, commands.MemberNotFound):
            await ctx.send(embed=discord.Embed(description=f"{self.bot.cross_emote} I could not find that role", color=discord.Color.red()))
#

this is what i have

maiden fable
#

This will check for first MemberNotFound, then BadArgument

slate swan
#

anyway, thanks though

spring flax
#

Why two memer not found

plucky shoal
#

Isn't it better to check the type of the error then error is SomeError?
Or is there no difference?

slate swan
#

Oops it is should be RoleNotFound

slate swan
#

I think

#

I was told that to solve i need OOP specificially child and parent inheritance

#

but have no idea lol

maiden fable
#

I am on mobile

plucky shoal
slate swan
#

i need help

spring flax
#

With?

steep estuary
slate swan
#

Of a message u mean

#

?

stone palm
#

can someone help me create an array of discord.SelectOptions since it gives me ```py
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: Object of type SelectOption is not JSON serializable

stone palm
#

?

spring flax
#

does discord.HTTPException hapeen a lot? Or is it just when a command fails

slate swan
fading harness
#

how to remove cogs properly

brisk helm
#
@commands.guild_only()
# Command cannot be used in private messages.

@commands.is_owner()
# Command can only be used by the bot owner.

@commands.is_nsfw()
# Command can only be used in NSFW channels

@commands.has_role("name") 
# Check if member has a role with the name "name"

@commands.bot_has_role(11132312313213) 
# As above, but for the bot itself. (name can be replaced with id)

@commands.has_any_role(["role1","foo",11132312313213]) 
# Check if user has any of the roles with the names "role1", "foo", or the role with id 11132312313213

@commands.bot_has_any_role(*roles) 
# As above, but for the bot itself

@commands.has_permissions([ban_members=True, kick_members=True]) 
# Check if user has all of the passed permissions 
#  e.g. this command will require both kick and ban permissions

@commands.bot_has_permissions(**perms)
# As above, but for the bot itself.

@commands.has_guild_permissions(**perms)
@commands.bot_has_guild_permissions(**perms)
# As for the two above, but for guild permissions rather than channel permissions.

@commands.check(myfunction)
# Check against your own function that returns those able to use your command

@commands.check_any(*myfunctions)
# Command will be ran if the conditions of any of your own check functions are met

from discord.ext.commands.cooldowns import BucketType
# BucketType can be BucketType.default, member, user, guild, role, or channel
@commands.cooldown(rate,per,BucketType) 
# Limit how often a command can be used, (num per, seconds, BucketType)

@commands.max_concurrency(number, per=BucketType.default, *, wait=False)
# Limit how many instances of the command can be running at the same time.
# Setting wait=True will queue up additional commands. False will raise MaxConcurrencyReached

# Checks can be stacked, and will Raise a CheckFailure if any check fails.โ€Š
``` check this ;)
#

Here you have got all checks

fading harness
slate swan
#

are nukebots allowed in this topic?

bitter depot
#

!rule 5

unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

visual island
#

!d discord.ext.commands.Command.reset_cooldown you can implement this so in the except block add ctx.command.reset_cooldown(ctx)

unkempt canyonBOT
river kindle
#

guys, how do i get an answer to a question asked by the bot in dm, with which command?

If you have not understood, I want that when a user asks that particular question to the bot and the user answers with "Yes", an embed appears in my specific channel saying <user> has tried to ask the question and has answered (Yes or No)

lofty heron
#

hi, how can i get the mentioned member's account creation date? also how do i put in a user's id. ik it has to do something with args and stuff but idk how

drifting arrow
#

okay uhh

boreal ravine
brisk helm
boreal ravine
winter pelican
#

i am tryna make a discord bot for the first time, this is my code its giving me errors

#
import os

client = discord.Client()

@client.event
async def on_ready():
   print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
  if message.author == client.user:
    return

    if message.content.startwith('>hello'):
      await message.channel.send('Hello!!')

      my_secret = os.environ('TOKEN')
      print(my_secret)```
winter pelican
boreal ravine
winter pelican
boreal ravine
winter pelican
boreal ravine
#

wait

drifting arrow
#

aaahhhh i can't figure this button shit out ;-;

winter pelican
boreal ravine
#

!d discord.ext.commands.Cooldown.reset

boreal ravine
manic wing
#

how can I put a command on a cooldown for a speciric person

#

specific

boreal ravine
#

dunno

#

Whats the error

#

do u have an error handler

broken igloo
#

How to localize discord bot using gettext? (Users can select bot's language on their servers)

boreal ravine
#

is reset_cooldown(ctx) defined?

#

same sorry I cant help

winter pelican
#
import os

client = discord.Client()

@client.event
async def on_ready():
   print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
  if message.author == client.user:
    return

    if message.content.startwith('>hello'):
      await message.channel.send('Hello!!')
      
     my_secret = os.environ('TOKEN')

      print(my_secret)```
#

on line 19 error

#

something about indentation

#

^

#

i used ur code

#

new error

little ether
# winter pelican

os.environ is a dict, so you'd do my_secret = os.environ.get('TOKEN') or my_secret = os.environ['TOKEN']

winter pelican
#

lemme see

#

indentation error now

little ether
winter pelican
lofty heron
little ether
fading harness
#

i remove cogs and this is what happen

#

can anyone help me fix this

boreal ravine
#

it isnt defined

#

what did u do to define it before?

winter pelican
boreal ravine
fading harness
#

before i remove the cogs it still usable

#

@boreal ravine

winter pelican
fading harness
winter pelican
#
import os

client = discord.Client()

@client.event
async def on_ready():
   print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
  if message.author == client.user:
    return

    if message.content.startwith('>hello'):
      await message.channel.send('Hello!!')
      
my_secret = os.environ['TOKEN']

print(my_secret)
client.run(my_secret)```
winter pelican
upbeat otter
fading harness
fading harness
winter pelican
upbeat otter
fading harness
winter pelican
#

lemme try it

upbeat otter
#

it'll work

#

but i recommend watching TechWithTim and using google and focs

fading harness
#

i remove cogs and this happened. can anyone fix?

upbeat otter
#

discord rewrite is better

fading harness
#

how can i insert code?

fading harness
# upbeat otter code

@bot.command()
async def queue(ctx): # display the current guilds queue
if len(song_queue[ctx.guild.id]) == 0:
return await ctx.send("Let me see... No song.")

embed = discord.Embed(title="Song Queue", description="", colour=discord.Colour.red())
i = 1
for url in song_queue[ctx.guild.id]:
    embed.description += f"{i}) {url}\n"

    i += 1

embed.set_footer(text="End of queue.")
await ctx.send(embed=embed)
upbeat otter
fading harness
#
async def queue(ctx): # display the current guilds queue
    if len(song_queue[ctx.guild.id]) == 0:
        return await ctx.send("Let me see... No song.")

    embed = discord.Embed(title="Song Queue", description="", colour=discord.Colour.red())
    i = 1
    for url in song_queue[ctx.guild.id]:
        embed.description += f"{i}) {url}\n"

        i += 1

    embed.set_footer(text="End of queue.")
    await ctx.send(embed=embed)```
upbeat otter
#

its more readable now, just a second

upbeat otter
winter pelican
ionic wadi
#

Is there a certain check to ignore dm messages?

#

I want to use It in an on_message (level cmd)

upbeat otter
upbeat otter
ionic wadi
#

I have a on message (xp) event ant I want It to ignore dm messages but what do I use for that?

#

if message.channel = private.channel:
return

I currently have this but It doesnt work xd

lone aurora
#
    if ctx.channel.name == "last-to-chat":
        embed = discord.Embed(
        title = '',
        description = '',
        colour = 0
        
        )
        embed.set_footer(text='By oSeatch#6969')
        embed.add_field(name='Disqualified!', value=f"{ctx.author} Has Lost!", inline=False)
        channel1 = client.get_channel(890476025996275732)
        guild = ctx.guild
        rol1e = discord.utils.get(guild.roles, name="susmommuted")
        await channel1.send(embed=embed)
        await ctx.author.add_roles(rol1e)
        return``` how do i make it so that the code won't effect bots
#

or a specific user in general

fading harness
upbeat otter
winter pelican
fading harness
upbeat otter
#

i see

upbeat otter
upbeat otter
#

its inside the first if statment

upbeat otter
upbeat otter
lone aurora
#

well they work for me, so i leave them empty lmao

upbeat otter
lone aurora
#

idk people tell me this alot but for some reason it never breaks for me

fading harness
fading harness
lone aurora
#

ah 1 sec

upbeat otter
#

kk

lone aurora
upbeat otter
lone aurora
#

i send a message, it adds the role and says that i have lost, its all good till then but the bot reacts to its own message

dapper cobalt
lone aurora
dapper cobalt
#

!d discord.Member

unkempt canyonBOT
#

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

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

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

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

hash(x) Returns the memberโ€™s hash.

str(x) Returns the memberโ€™s name with the discriminator.
dapper cobalt
#

You can even make a custom check.

upbeat otter
dapper cobalt
#

!customcheck

unkempt canyonBOT
#

Custom Command Checks in discord.py

Often you may find the need to use checks that don't exist by default in discord.py. Fortunately, discord.py provides discord.ext.commands.check which allows you to create you own checks like this:

from discord.ext.commands import check, Context

def in_any_channel(*channels):
  async def predicate(ctx: Context):
    return ctx.channel.id in channels
  return check(predicate)

This check is to check whether the invoked command is in a given set of channels. The inner function, named predicate here, is used to perform the actual check on the command, and check logic should go in this function. It must be an async function, and always provides a single commands.Context argument which you can use to create check logic. This check function should return a boolean value indicating whether the check passed (return True) or failed (return False).

The check can now be used like any other commands check as a decorator of a command, such as this:

@bot.command(name="ping")
@in_any_channel(728343273562701984)
async def ping(ctx: Context):
  ...

This would lock the ping command to only be used in the channel 728343273562701984. If this check function fails it will raise a CheckFailure exception, which can be handled in your error handler.

upbeat otter
#

Anyways, i forgot to ask my own problem lol

#

is there a way to download images using the link of the image specified by the user?

lone aurora
#
    if ctx.channel.name == "last-to-chat":
        embed = discord.Embed(
        title = '',
        description = '',
        colour = 0
        
        )
        embed.set_footer(text='By oSeatch#6969')
        embed.add_field(name='Disqualified!', value=f"{ctx.author} Has Lost!", inline=False)
        channel1 = client.get_channel(890476025996275732)
        guild = ctx.guild
        rol1e = discord.utils.get(guild.roles, name="susmommuted")
        await channel1.send(embed=embed)
        await ctx.author.add_roles(rol1e)
    elif ctx.author == bot:
        return``` should this work?
winter pelican
lone aurora
#

i did..

#

and it did the same thing as before..

fading harness
upbeat otter
boreal ravine
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.

upbeat otter
boreal ravine
#

you obviously dont know basic python

winter pelican
lone aurora
winter pelican
#

i cant spell

river kindle
#

guys, how do i get an answer to a question asked by the bot in dm, with which command?

If you have not understood, I want that when a user asks that particular question to the bot and the user answers with "Yes", an embed appears in my specific channel saying <user> has tried to ask the question and has answered (Yes or No)

fading harness
upbeat otter
boreal ravine
lone aurora
#
@client.event
async def on_message(ctx):
    if ctx.channel.name == "last-to-chat":
        embed = discord.Embed(
        title = '',
        description = '',
        colour = 0
        
        )
        embed.set_footer(text='By oSeatch#6969')
        embed.add_field(name='Disqualified!', value=f"{ctx.author} Has Lost!", inline=False)
        channel1 = client.get_channel(890476025996275732)
        guild = ctx.guild
        rol1e = discord.utils.get(guild.roles, name="susmommuted")
        await channel1.send(embed=embed)
        await ctx.author.add_roles(rol1e)
    elif ctx.author == client:
        return``` this the whole thing
upbeat otter
lone aurora
upbeat otter
upbeat otter
river kindle
upbeat otter
#

!wait_for

#

F

river kindle
upbeat otter
upbeat otter
river kindle
slate swan
#

!d discord.Client.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**...
upbeat otter
hushed salmon
#

.help

river kindle
upbeat otter
river kindle
#

bruh I'm not understanding anything

slate swan
gloomy coral
#

how to get server prefix in on message

#

normally i use ctx.prefix but wht here

boreal ravine
upbeat otter
upbeat otter
gloomy coral
#

help me plssssssss

river kindle
upbeat otter
boreal ravine
#

!d discord.on_member_remove

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.
upbeat otter
#

on_member_remove event

gloomy coral
#

the prefix is {message.prefix}

#

now message doesnt have a prefix

#

so wht shld i do?

boreal ravine
#

do bot.prefix

upbeat otter
#

i dont understand your question, maybe someone else can help, me dumb

gloomy coral
#

ok

#

no

leaden anvil
gloomy coral
#

tht didnt work

#

Pls help @boreal ravine

lone aurora
#

@dapper cobalt ```py
@client.event
async def on_message(ctx):
bot1221 = #if i add the bot's id here will it work?
if (ctx.channel.name == "last-to-chat" and not ctx.author(bot1221)):
embed = discord.Embed(
title = '',
description = '',
colour = 0

    )
    embed.set_footer(text='By oSeatch#6969')
    embed.add_field(name='Disqualified!', value=f"{ctx.author} Has Lost!", inline=False)
    channel1 = client.get_channel(890476025996275732)
    guild = ctx.guild
    rol1e = discord.utils.get(guild.roles, name="susmommuted")
    await channel1.send(embed=embed)
    await ctx.author.add_roles(rol1e)``` you think this will work? *sorry for the ping but u seem like the only one who knows what im trying to do*
molten crane
#

can someone tell me how to make a thread from a message using discord.py please ??

gloomy coral
#
@commands.Cog.listener()
    async def on_message(self,message):
        if message.content=="@Chad#6621":
            embed=discord.Embed(title="I have been summoned!!",color=discord.Color.random(),description=f"My Prefix on this server is `{self.bot.prefix}`\n Simply do {self.bot.prefix}help to see all my commands!")
            embed.set_footer('I was chilling until you disturbed me :(')
            await message.channel.send(embed=embed)```
bitter depot
dapper cobalt
slate swan
lone aurora
gloomy coral
bitter depot
molten crane
slate swan
gloomy coral
#

yea

leaden anvil
# gloomy coral

First of all you have to import py import discord from discord import * fro pm discord.ext.commands import bot

gloomy coral
#

i actually hv a command for tht

leaden anvil
bitter depot
#

Even without cogs that's very wrong

leaden anvil
bitter depot
gloomy coral
#
    @commands.Cog.listener()
    async def on_message(self,message):
        if message.content=="@Chad#6621":
            prefix=command_prefix
            embed=discord.Embed(title="I have been summoned!!",color=discord.Color.random(),description=f"My Prefix on this server is `{prefix}`\n Simply do {prefix}help to see all my commands!")
            embed.set_footer('I was chilling until you disturbed me :(')
            await message.channel.send(embed=embed)```
#

not defined

bitter depot
#

How is that at all what we told you to do

#

You need to call the get_prefix method of your bot, passing a message argument

leaden anvil
leaden anvil
bitter depot
#

commands.Bot (uppercase because it's the class not the file) and ="@"

maiden fable
gloomy coral
#
async def determine_prefix(bot, message):
    if message.guild:
        db = TinyDB('databases/prefix.json')
        if message is not None:
            guild_id = message.guild.id
        query = Query()
        if db.search(query['guild_id'] == str(guild_id)):
            values = list(map(lambda entry: entry["prefix"], db.search(
                query.guild_id == str(guild_id))))
            return values
        return '!'

    else:
        return '!'```
#

hows this?

#

mr tizzy

winter pelican
bitter depot
gloomy coral
#

bruh im not understanding

molten crane
#

can someone tell me how to make a thread from a message using discord.py please ?? ๐Ÿฅบ

gloomy coral
#

wdym of my bot

bitter depot
#

If you cannot understand "call this function" then you really shouldn't be doing a discord bot

stone palm
#

whats better? discord.utils or guild.get?

gloomy coral
#

which function and where do i call it

maiden fable
leaden anvil
bitter depot
stone palm
gloomy coral
#

OHHHHHHH

#

im an idiot

boreal ravine
#

or just make a variable and store the prefix there

gloomy coral
#

sry for wasting ur time tizzy

leaden anvil
sick talon
#

how to make this timestamps using bot ? pithink

boreal ravine
sick talon
molten crane
#

can someone tell me how to make a thread from a message using discord.py please ?? someone help ๐Ÿฅบ

boreal ravine
leaden anvil
# leaden anvil https://discord.com/channels/267624335836053506/343944376055103488/8912733040721...

code : ```py
@Buttons.click
async def y (ctx):
send=discord.Embed(color=0x51ed87)
send.add_field(name="Action Confirmed", value="Report successfully sent.")
await ctx.message.edit(embed=send)

@Buttons.click
async def n (ctx):
discard=discord.Embed(color=0xed4245)
discard.add_field(name="Action Failed", value="Report discarded")
await ctx.message.edit(embed=discard)``` using module called discord_buttons_plugin for event handler

bitter depot
#

That shows the different formats

molten crane
bitter depot
slate swan
#

๐Ÿ˜ฆ

bitter depot
unkempt canyonBOT
#

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

Creates a public thread from this message.

You must have [`create_public_threads`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.create_public_threads "discord.Permissions.create_public_threads") in order to create a public thread from a message.

The channel this message belongs in must be a [`TextChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel "discord.TextChannel").

New in version 2.0.
boreal ravine
#

๐Ÿคทโ€โ™‚๏ธ

molten crane
sick talon
#

๐Ÿคทโ€โ™‚๏ธ i mentioned it here

gloomy coral
#

Hey

slate swan
#

is @unkempt canyon now updated with the master branch?

slate swan
gloomy coral
#

this returns [!] @bitter depot

slate swan
#

!d discord.Member.banner

unkempt canyonBOT
#

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

yes

#

master branch there you go

boreal ravine
leaden anvil
boreal ravine
#

I did you clicked the button and it worked

leaden anvil
visual yarrow
#

With discord.py, is it possible to pass a message to the bot (as a string) just to see how that message will be parsed and which command will be run, without actually running the bot in a test-server?

brazen raft
#

I'm pretty sure you can stimulate events but I don't remember how

bitter depot
visual yarrow
molten crane
# unkempt canyon

can you give me an example of how to use this ??
i got AttributeError: 'Message' object has no attribute 'create_thread'

broken igloo
#

I do this at the beginning of my file

_ = Translator()

Where Translator is my own class, which can translate strings. It finds guild's locale using database query. And it works.
But if I have some commands like this

@commands.command()
async def test(self, ctx):
embed = discord.Embed(title=_("Test embed"))
for i in range(5):
    embed.add_field(name=_(f"Field number {i + 1}"), value=_("Field's value"))
await ctx.send(embed=embed)

We can see that _ functions are called a lot of times. Every time when I call function _ my translator gets guild's language. But I think I can get guild's language once. How to optimize my code?

bitter depot
#

Or fetch_context

molten crane
bitter depot
#

Eh can't remember it lol

bitter depot
molten crane
gloomy coral
#

but how can there be more thn 2

molten crane
bitter depot
#

!d discord.ext.commands.Bot.get_context

unkempt canyonBOT
#

await get_context(message, *, cls=<class 'discord.ext.commands.context.Context'>)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Returns the invocation context from the message.

This is a more low-level counter-part for [`process_commands()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.process_commands "discord.ext.commands.Bot.process_commands") to allow users more fine grained control over the processing.

The returned context is not guaranteed to be a valid invocation context, [`Context.valid`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Context.valid "discord.ext.commands.Context.valid") must be checked to make sure it is. If the context is not valid then it is not a valid candidate to be invoked under [`invoke()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.invoke "discord.ext.commands.Bot.invoke").
bitter depot
#

@visual yarrow ^ if you have a discord.Message you can use this to get the Context

icy seal
#

Tizzy can I ask, who is maintaining v2, the master branch? Is it being updated on the rapptz/discordpy github page, as I thought it wasnโ€™t being maintained by Danny anymore. Apologies for singling you out specificallyโ€ฆ

full lily
#

context.command or context.invoked_parents might be useful

visual yarrow
bitter depot
visual yarrow
#

I'm looking to test how the bot parses certain messages as commands.

visual yarrow
bitter depot
#

I'm not 100% sure what you're after

#

It's just get_context then invoke

visual yarrow
# bitter depot I'm not 100% sure what you're after

So, I'm not 100% sure how the certain messages will be parsed. Eg where the breaks will be between the arguments will be, which command/subcommand will be run in certain circumstances, etc. And I was looking to test it.

visual island
#

note: the Context might be invalid, to check see Context.valid

bitter depot
#

If you want an automated version I'm not too sure

#

Maybe create a MockMessage which just has all the attrs needed to make a Context (everything that get_context uses)

#

Then bot.invoke(ctx) ig

slate swan
#

so i have this code and it work perfectly. But i want it to make it when the user leaves, it takes away the role

#
@commands.Cog.listener()
    async def on_voice_state_update(self, member, before, after):
      if before.channel is None and after.channel is not None:
        if after.channel.id == 886331304944214077:
            for guild in self.client.guilds:
                role_id = 891274340438532136
                role = get(guild.roles, id=role_id)
                logschannel = self.client.get_channel(886331433134727178)
                channel2 = await guild.create_voice_channel(name='๐Ÿ“ž Support')
                await channel2.set_permissions(member, connect = True)
                await channel2.set_permissions(guild.default_role, connect = False, view_channel = False)
                await member.move_to(channel2)
                await logschannel.send(f"**ฮŸ {member.mention} ฮผฯ€ฮฎฮบฮต ฯƒฯ„ฮฟ Support!**")
                await member.add_roles(role)
#

and i have NO IDEA how

maiden fable
#

!d discord.on_voice_state_update

unkempt canyonBOT
#

discord.on_voice_state_update(member, before, after)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") changes their [`VoiceState`](https://discordpy.readthedocs.io/en/master/api.html#discord.VoiceState "discord.VoiceState").

The following, but not limited to, examples illustrate when this event is called...
maiden fable
#

Uhhh, I forgot. What do the after and before refer to?

brazen raft
#

Before the voice state updated and after the voice state updated

maiden fable
#

Ah

#

!d discord.VoiceState

brazen raft
#

Probably

unkempt canyonBOT
#

class discord.VoiceState```
Represents a Discord userโ€™s voice state.
maiden fable
#

!d discord.VoiceState.channel

unkempt canyonBOT
#

The voice channel that the user is currently connected to. None if the user is not currently in a voice channel.

maiden fable
#

Check if its None

#

So this will be after.channel

#

@slate swan

#

Something like

if after.channel is None:
    . . . . (Remove roles) 
fading harness
#

hey

#

i want to determine that the message author has permissions to kick member or not

#

in a if

bitter depot
fading harness
#

and determine that the bot has permissions to kick member or not

bitter depot
#

Edited

maiden fable
#

if guild.me.guild_permissions.kick_members:
. . . .

Should do it

bitter depot
#

And same for the author

maiden fable
#

Ah, yea... I was referring to the second message

bitter depot
maiden fable
#

Yea

fading harness
#

oh

#

so how can i determine that the bot has permissions to kick member or not?

bitter depot
#

@fading harness

#

You may want to make it into a util function

fading harness
fading harness
bitter depot
#
if can_kick(author, person) and can_kick(bot, person):```or something
woven dew
#

!d help

#

!d -h

#

!

#

!d -?

#

!d -h d

#

๐Ÿ˜ 

full lily
#

whatcha trying to do

woven dew
#

Read how to use this discord bot

#

Sorry, i am in wrong channel maybe

slate swan
#
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.')

@client.event
async def on_ready():
    print("Bot is ready.")

@client.command()
async def hello(ctx):
  myembed = discord.Embed(title="$name.logo", color=0x1fa3d8)
  myembed.add_field(name="hello there", value='''
โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘
โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•''', inline=False)
  await ctx.send(embed=myembed)

  client.run("TOKEN")
``` @full lily
full lily
#
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.')

@client.event
async def on_ready():
    print("Bot is ready.")

@client.command()
async def hello(ctx):
  myembed = discord.Embed(title="$name.logo", color=0x1fa3d8)
  myembed.add_field(name="hello there", value='''
โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘
โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•''', inline=False)
  await ctx.send(embed=myembed)

client.run("TOKEN") # unindented
#

Though if you're struggling with indentation you might wanna have some more practice with python before attempting a disc bot

slate swan
#

better projects than a discord bot exist for "practise"

maiden fable
#

!projecrs

unkempt canyonBOT
#

Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

maiden fable
#

There

reef shell
#

Practice by making dc botsyert

#

?

slate swan
#

yes

reef shell
#

Very bad

cloud dawn
#

discord module is a bit too advanced for that

maiden fable
slate swan
#

ah

brisk helm
#

Is here a channel where i can ask for help in me dashboard

cloud dawn
#

it's like saying to someone with no coding experience to make an ML project.

brisk helm
reef shell
maiden fable
maiden fable
cloud dawn
cloud dawn
cloud dawn
#

Machine learning

maiden fable
#

Machine Learning

reef shell
#

Machine L

maiden fable
reef shell
#

on_guild_join

#

Event

maiden fable
#

!d discord.on_guild_add

#

!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.
cloud dawn
crude skiff
#

anyone online?

slate swan
#

46k + people

reef shell
#

rn

#

And many more is online but just set the status to invisible just like methinkmon

slow smelt
#

how do i make a bot

#

??j

#

what kind of website do i use to make a bot

visual island
#

!d discord

unkempt canyonBOT
#

In order to work with the library and the Discord API in general, we must first create a Discord Bot account.

Creating a Bot account is a pretty straightforward process.

slow smelt
#

nooo

#

i waana create my own

#

oh nvm

slate swan
#

why is this happend?

boreal ravine
slate swan
#

the message has no reactions on it

boreal ravine
#

or that

slate swan
#

so what i need to fix?

boreal ravine
#

Its your code

boreal ravine
slate swan
boreal ravine
slate swan
#

yes

boreal ravine
slate swan
#

still..

visual island
waxen granite
#

:3

slate swan
visual island
#

try printing gaw_message in bot.cached_messages

#

oh I see

#

have you enabled intents.reactions?

#

!d discord.Intents.reactions

unkempt canyonBOT
shrewd dragon
#

@visual island

visual island
#

^^ @shrewd dragon

shrewd dragon
hasty iron
shrewd dragon
#

Ty

river kindle
#

So this is the code as you can see when a user requests to become server staff the bot sends all the format, then there are the commands "d1" and response1
I want answer 1 (including all other questions)
is sent in a dedicated channel with an embed, which says the username, and what answers it gave

slate swan
#
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.')

@client.event
async def on_ready():
    print("Bot is ready.")

         @client.command()
         async def embed(ctx):
         embed=discord.Embed(title="A Warm Welcoming.", description="Hey, I am Cogi, nice to meet you.", color=0x000000)
         await ctx.send(embed=embed)

embed.set_author(name="Cogi"", url="https://twitter.com/RealDrewData, "Cogi")

embed.set_thumbnail(url="https://cdn.discordapp.com/attachments/891076562206736397/891261099289247794/image0.jpg")

embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)

@client.command()
async def hello(ctx):
  myembed = discord.Embed(title="logo", color=0x1fa3d8)
  myembed.add_field(name="hello there", value='''
โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘
โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•''', inline=False)
  await ctx.send(embed=myembed)

  client.run("TOKEN")

will this code work?

slate swan
#

unexpendant indent ??

river kindle
#

where

slate swan
#

idk

#

it says

#

how its possible to use json... like for a custom prefix or updating a variable...

brazen raft
#

A JSON file is like a text file which holds a dictionary.
You can use the json library to work with JSON files.

#

Or even from strings containing JSON data

slate swan
#

ik, but how can I w or r it

brazen raft
#

If you can think of a way of doing it with a dictionary, you can think of a way to do it with JSON.

slate swan
boreal ravine
slate swan
boreal ravine
slate swan
boreal ravine
slate swan
boreal ravine
#

hm.

#

!d discord.on_guild_remove

unkempt canyonBOT
#

discord.on_guild_remove(guild)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") is removed from the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client").

This happens through, but not limited to, these circumstances...
boreal ravine
boreal ravine
boreal ravine
river kindle
#

So this is the code as you can see when a user requests to become server staff the bot sends all the format, then there are the commands "d1" and response1
I want answer 1 (including all other questions)
is sent in a dedicated channel with an embed, which says the username, and what answers it gave

slate swan
boreal ravine
slate swan
boreal ravine
#

the tutorial

#

has it all

slate swan
#

it isn't a video

little ether
normal jasper
#

guys when i write .rps rock its ok for my bot and it works but when i write .rps Rock or something it just dosen't answer

#
@client.command()
async def rps(ctx , player_choice):
        username = str(ctx.author).split('#')[0]
        user_message = str(ctx.message.content)
        channel = str(ctx.channel)
        choices = ['rock','paper','scissors']
        bot_choice = random.choice(choices)
        if player_choice.lower() not in choices :
#

my code

visual island
#

make the player_choice lowercase

#

!d str.lower

unkempt canyonBOT
#

str.lower()```
Return a copy of the string with all the cased characters [4](https://docs.python.org/3.10/library/stdtypes.html#id15) converted to lowercase.

The lowercasing algorithm used is described in section 3.13 of the Unicode Standard.
slow smelt
#

can anyone help me out

#

@visual islandi did not understand your info

#

how do i make a bot ?

visual island
# unkempt canyon

click the link, then you'll see a full walkthrough of making a bot account

normal jasper
slow smelt
#

but did not understand it

visual island
visual island
slow smelt
#

i did everyhting it said me to

visual island
#

It hasnt even get to the hardest thing

slow smelt
#

and i created a nnew bot

visual island
#

then?

normal jasper
# visual island show the full code
async def rps(ctx , player_choice):
        username = str(ctx.author).split('#')[0]
        user_message = str(ctx.message.content)
        channel = str(ctx.channel)
        choices = ['rock','paper','scissors']
        bot_choice = random.choice(choices)
        if player_choice.lower() == bot_choice.lower() :
                await ctx.send(f'Tie ! We Both Picked {player_choice} .')
        elif (player_choice.lower() == 'Rock' and bot_choice.lower() == 'Scissors') or (player_choice.lower() == 'Scissors' and bot_choice.lower() == 'Paper') or (player_choice.lower() == 'Paper' and bot_choice.lower() == 'Rock') :
                await ctx.send(f'You won ! but this is not going to happen again . My choice was {bot_choice} .')
        elif (player_choice.lower() == 'Rock' and bot_choice.lower() == 'Paper') or (player_choice.lower() == 'Scissors' and bot_choice.lower() == 'Rock') or (player_choice.lower() == 'Paper' and bot_choice.lower() == 'Scissors'):
                await ctx.send(f'Haha You lose ! My Choice was {bot_choice}')
        else : 
                await ctx.send('Oh ! You Did a Typo , Try Again Please !')
        return```
slow smelt
#

now@visual island

#

i want it to say hi when i say

#

so like if i say hi the bot should say hello

normal jasper
#

i will teach you

slate swan
#

Hi, so I have a bad word blocker but here's my issue. I have this content count thing I want to do but here's the issue.

The bot's only counting the same word. if I say fuck fuck it counts it twice. BUT, if I say fuck shit it counts it once. Here's the code for the content count

embed.add_field(name="Content count", value=message.content.count(word), inline=False)

visual island
slow smelt
#

yeah ?

slate swan
#

I'm getting each word from the blacklist which I defined as the file. blacklist is the file and I'm getting each word in the file. (I have that above my code. I didn't send it here though)

visual island
#
value = {word: message.content.count(word)} 
```I have no idea what type word is, but try this
#

and can you show your full code

slate swan
slate swan
hasty iron
#

just send it here

manic wing
#

say what

hasty iron
#

if user_list is a list of ids yes

steady ember
#

ok

fallow trench
#

just coded a full project that has over 50 commands

manic wing
#

๐Ÿฅ‡

fallow trench
#

gonna prob leak source

#

its in python

manic wing
#

is this some huge announcement

hasty iron
#

i dont know if "leak" is the correct word

#

its more like "make open source"

fallow trench
#

even has ip lookup and portscanning tools

slate swan
#

@fallow trench

#

help me w my bot

hasty iron
manic wing
hasty iron
#

port scanning is easy

manic wing
#

you want a medal or something?

fallow trench
#

yes a medal would be nice

slate swan
#

how do you make it crack an IP

fallow trench
manic wing
slate swan
fallow trench
#

its for your on use correct no harm ?

slate swan
#

I need help at here, it says Command raised an exception: AttributeError: 'str' object has no attribute 'id' ```py
@client.command()
@commands.has_permissions(administrator=True)
async def prefix(ctx, prefix):

with open("prefixes.json", "r") as f:
    prefixes = json.load(f)

prefixes[str(guild.id)] = prefix

with open("prefixes.json", "w") as f:
    json.dump(prefixes, f)```
hasty iron
#

"like committing a federal crime?"

#

!rule 5

unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

fallow trench
#

just check dms

slate swan
#

i was kidding

slate swan
hasty iron
#

i think you want ctx.guild

slate swan
#

^^

slate swan
#

also , avoid using json :3

slate swan
#

seems like its a string

soft trout
brazen seal
slate swan
soft trout
#

sorry not who, why

manic wing
slate swan
brazen seal
#

what?

manic wing
#

!pypi discord-pretty-help

unkempt canyonBOT
brazen seal
#

what is it

hasty iron
manic wing
#

it automatically makes a help command for you

slate swan
maiden fable
slate swan
slate swan
manic wing
brazen seal
hasty iron
brazen seal
#

yes it just delete message

hasty iron
#

ok then you can have while the emoji isnt X: (pseudocode)

#

actually thinkinh about it

slate swan
# slate swan json is not actually a database , it can get corrputed easily
# PARAMETER ============================================================================================================
def get_prefix(client, message):

    with open("prefixes.json", "r") as f:
        prefixes = json.load(f)
    return prefixes[str(message.guild.id)]``` ```py
# PREFIX ===============================================================================================================
@client.event
async def on_guild_join(guild):

    with open("prefixes.json", "r") as f:
        prefixes = json.load(f)

    prefixes[str(guild.id)] = "$"

    with open("prefixes.json", "w") as f:
        json.dump(prefixes, f)


@client.command()
@commands.has_permissions(administrator=True)
async def prefix(ctx, prefix):

    with open("prefixes.json", "r") as f:
        prefixes = json.load(f)

    prefixes[str(guild.id)] = prefix

    with open("prefixes.json", "w") as f:
        json.dump(prefixes, f)``` Only my command isn't working :/
hasty iron
#

it might be a bit complicated

brazen seal
wide tartan
#

im trying to convert seconds by hour:minute:second

slate swan
#

i mean , you cannot convert a non numerical string to int

#

it maybe be because the audio playing at the moment is a live stream

#

also , ytdl is against tos so cant help further

visual yarrow
#

Hello. Is it possible for a command to take arguments, but also have subcommands?

slate swan
#

you can ofcourse do that

#

it will not take the arguments with same value as the sub command name tho

visual yarrow
#

I mean, using bot.group, without having to parse the subcommand myself.

visual yarrow
slate swan
#

can i ask someone that knows python really well a question in dms

#

not here

hasty iron
#

iirc there is the invoke_without_subcommand kwargs or something like that

slate swan
#

anyone?

hasty iron
#

most people dont do help in dms

#

so just ask your question

hasty iron
visual yarrow
# slate swan yeah exactly

Hmm, with the following code, when I try invoking !foo bar, I get 'foo' command run with arg 'bar'. ```py
from discord.ext import commands
from discord.ext.commands import Context, Bot
import discord
import config
import logging

logging.basicConfig()
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)

bot = Bot(commands.when_mentioned_or('!'))

@bot.group()
async def foo(ctx: Context, *, arg: str = ''):
logger.info(f"'foo' command run with arg {arg!r}")

@foo.command()
async def bar(ctx: Context, *, arg: str = ''):
logger.info(f"'foo bar' command run with arg {arg!r}")

bot.run(config.token)

hasty iron
#

its False by default

unkempt canyonBOT
#

discord/ext/commands/core.py line 1408

self.invoke_without_command: bool = attrs.pop('invoke_without_command', False)```
slate swan
visual yarrow
#

Success ๐ŸŽ‰

brazen seal
#

@hasty iron ?

river kindle
#

guys, how do i get an answer to a question asked by the bot in dm, with which command?

If you have not understood, I want that when a user asks that particular question to the bot and the user answers with "Yes", an embed appears in my specific channel saying <user> has tried to ask the question and has answered (Yes or No)

slate swan
unkempt canyonBOT
#

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

Sends a message to the destination with the content given.

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

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

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

and use wait_for('message') to get the answer

river kindle
#

look my dm

#

please

slate swan
#

i already answered you what you need to do

pastel torrent
#

Hello! Probably not right channel... But the best I could find. The question is: Where is the best and cheap servers for a Discord bot and other python things?

unkempt canyonBOT
#

Hey @knotty lagoon!

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

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

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

https://paste.pythondiscord.com

slate swan
#

@pastel torrent

drifting arrow
#

oh no!

#

the bot zapped again

river kindle
slate swan
#

that was just an example not to be copy pasted

river kindle
#

i need some help

#

@slate swan

#

please Pepe_Pray

slate swan
#

send the code you have rn

river kindle
#

yay

#

just a moment

drifting arrow
#

how does the wait_for method work?

river kindle
#

is this

#

@slate swan

soft trout
#

Can you put a button inside a embed

river kindle
slate swan
#
import discord
from discord.ext import commands

client = commands.Bot(command_prefix = '.')

@client.event
async def on_ready():
    print("Bot is ready.")

         @client.command()
         async def embed(ctx):
         embed=discord.Embed(title="A Warm Welcoming.", description="Hey, I am Cogi, nice to meet you.", color=0x000000)
         await ctx.send(embed=embed)

embed.set_author(name="Cogi")

embed.set_thumbnail(url="PIC")

embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)

@client.command()
async def hello(ctx):
   myembed = discord.Embed(title="logo", color=0x1fa3d8)
   myembed.add_field(name="hello there", value='''
โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ•โ•โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–‘โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–‘โ–‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–‘โ–‘โ•šโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘
โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘
โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ–‘โ–‘โ•šโ•โ•โ•โ•โ•โ•โ–‘โ•šโ•โ•''', inline=False)
   await ctx.send(embed=myembed)
                               
client.run("TOKEN")
#

WHAT TO FIX, MY CODE WON'T WORK

#

๐Ÿฅฒ

soft trout
#

WHAT IS THE ERROR

slate swan
#

UH

river kindle
#

@soft trout u can help me with this button

soft trout
#

huh?

river kindle
#

yes

slate swan
#

file 'main.py', line 10
@client.command()

#

^
indentationerror : unexpected indent

soft trout
#

ok

#

so

#

indents

#

look at the last command

slate swan
#

yes

soft trout
#
@client.event
async def on_ready():
    print("Bot is ready.")

         @client.command()
         async def embed(ctx):
         embed=discord.Embed(title="A Warm Welcoming.", description="Hey, I am Cogi, nice to meet you.", color=0x000000)
         await ctx.send(embed=embed)

embed.set_author(name="Cogi")

embed.set_thumbnail(url="PIC")

embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)
slate swan
#

i am looking

lament mesa
soft trout
#

yeah

slate swan
#

i don't know what an indentation is

#

therefore i must seek help from professionals ๐Ÿ‘€

soft trout
#

you should try easier subjects before doing discord bots

slate swan
#

i know, i'm trying to learn through bots, what do i fix tho, and what did i do wrong

soft trout
#
embed.set_author(name="Cogi")

embed.set_thumbnail(url="PIC")

embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)   
```  this has to be on the same level as the other code
#

so like

slate swan
#

as in?

drifting arrow
#
    @commands.command()
    async def mybutton(self, ctx):
        
        view = View()
        view.add_item(Button(label="button", custom_id="my_button",row=1))
        await ctx.send("Your board", view=view)
        
        await self.client.wait_for(view.interaction_check(), check=None)
        await ctx.send("Button Pressed!")
```What am I doing wrong? why won't it work?
soft trout
#

woops

#
@client.event
async def on_ready():
    print("Bot is ready.")

         @client.command()
         async def embed(ctx):
         embed=discord.Embed(title="A Warm Welcoming.", description="Hey, I am Cogi, nice to meet you.", color=0x000000)
         await ctx.send(embed=embed)

         embed.set_author(name="Cogi")

         embed.set_thumbnail(url="PIC")

         embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)```
drifting arrow
soft trout
#

thats not mine tho

slate swan
#

yes

drifting arrow
slate swan
#

so

drifting arrow
slate swan
#
await ctx.ed(embed=embed)
@client.event
async def on_ready():
    print("Bot is ready.")

         @client.command()
         async def embed(ctx):
         embed=discord.Embed(title="A Warm Welcoming.", description="Hey, I am Cogi, nice to meet you.", color=0x000000)
         await ctx.send(embed=embed)

         embed.set_author(name="Cogi")

         embed.set_thumbnail(url="PIC")

         embed.add_field(name="What can I do for you..?", value="I can do a lot for you, actually. This is for you too find out.", inline=False)
slate swan
#

what's the error

soft trout
unkempt canyonBOT
#
Fat chance.

Package could not be found.

soft trout
#

hold on

#

what?

drifting arrow
soft trout
slate swan
#

i believe there is nothing wrong with the code

#

hm

drifting arrow
slate swan
#

indeed

drifting arrow
#

If there wasnt anything wrong with the code I wouldnt be here

slate swan
#

ik

drifting arrow
#
    await self.client.wait_for("my_button", check=view.interaction_check())
TypeError: interaction_check() missing 1 required positional argument: 'interaction'
drifting arrow
#

Coz I dont particularly feel like remaking my bot

slate swan
#

test

lament mesa
#

Test successful.

static anchor
#

how do I fix this

lament mesa
#

!indent

unkempt canyonBOT
#

Indentation

Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.

Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.

Example

def foo():
    bar = 'baz'  # indented one level
    if bar == 'baz':
        print('ham')  # indented two levels
    return bar  # indented one level

The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.

Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines

More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation

static anchor
#

??

slate swan
#

fix your indent

static anchor
#

@lament mesa

#

?

static anchor
lament mesa
#

the indentation is wrong

static anchor
#

what do I put there instead

lament mesa
#

there is a tag which explains it

slate swan
#

its an indent error literally right there

lament mesa
unkempt canyonBOT
#

Indentation

Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.

Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.

Example

def foo():
    bar = 'baz'  # indented one level
    if bar == 'baz':
        print('ham')  # indented two levels
    return bar  # indented one level

The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.

Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines

More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation

slate swan
#

dpy is very advanced so you might wanna learn basic python first

static anchor
#

ok

#

@slate swan @lament mesa thanks btw

slate swan
#

Anyone know how I can fix this error?

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "c:\Users\user\OneDrive\Desktop\Profanity Blocker\main.py", line 924, in on_message
    embed.add_field(name="Content count", value = {word: message(word) for word in test2 if regex_match_true.search(message.content) and regex_match_none.search(message.content) is None(word) != 0})  File "c:\Users\user\OneDrive\Desktop\Profanity Blocker\main.py", line 924, in <dictcomp>
    embed.add_field(name="Content count", value = {word: message(word) for word in test2 if regex_match_true.search(message.content) and regex_match_none.search(message.content) is None(word) != 0})TypeError: 'NoneType' object is not callable```
#

Code:


symbols = string.punctuation + string.digits + "โ€Ž"
letters = string.ascii_letters + "โ€Ž"

with open("test.txt") as file:
    test2 = file.read().split('\n')

@bot.listen("on_message")
async def on_message(message):

    guild = message.guild
    bypassedRole = discord.utils.get(guild.roles, name="Bypassed")


    if bypassedRole in message.author.roles:
        return

    for word in test2:
        regex_match_true = re.compile(fr"[{symbols}]*".join(list(word)), re.IGNORECASE)
        regex_match_none = re.compile(fr"([{letters}]+{word})|({word}[{letters}]+)", re.IGNORECASE)
        if regex_match_true.search(message.content) and regex_match_none.search(message.content) is None:
            await message.delete()
            embed = discord.Embed(title="Message Deleted", color=0xD708CC, description= f"{message.author.mention}, You're not allowed to say that.")
            embed.timestamp = datetime.utcnow()
            await message.channel.send(embed=embed)


            the_guild = message.guild
            the_channel = discord.utils.get(the_guild.text_channels, name="badword-logs")
            the_author = message.author

            embed = discord.Embed(title="Bad Word Blocked", description=f"{message.author.mention} sent a bad word", color=15158332)
            embed.add_field(name="Blocked Message", value=f"{message.content}", inline=False)
            embed.add_field(name="Channel", value=f"{message.channel.mention}", inline=False)
            embed.add_field(name="Content count", value = {word: message(word) for word in test2 if regex_match_true.search(message.content) and regex_match_none.search(message.content) is None(word) != 0})
            embed.timestamp = datetime.utcnow()
            await the_channel.send(embed=embed)```
#

Anyone know the issue?

maiden fable
#

Why r u doing None(word)

#

That's the error lol

heavy gull
#

How do I get the permissions of a user on a server

maiden fable
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.
boreal ravine
#

that returns the permissions integer I think

slate swan
maiden fable
slate swan
maiden fable
#

He can do dict()

brazen seal
maiden fable
slate swan
#

Oh okay, I didnโ€™t know what you meant by โ€œsureโ€. I thought you meant it as sarcasmSorry lol

maiden fable
#

Haha it's fine

dry pelican
#

Hello.

#

How do I check if there has been a role/everyone ping in the server

supple plume
dusk pumice
#

Hunter is very good guy. Helpes everyone. The best teacher ever I have seen.

#

So I like him.

dusk pumice
#

And you can get the code of emogi.

#

If It doesn't work.... or if you already know that than I'm so sorry. I hope it works.
And I can't see your codes with my phone:(

#

That's all

maiden fable
dusk pumice
#

Oh hunter

maiden fable
#

Hi

dusk pumice
#

Hi

#

It's good to see you.

maiden fable
#

Uhhh, cool, ig?

dusk pumice
#

yep!

#

๐Ÿ™‚

maiden fable
#

when pylance and python don't get along pithink

dusk pumice
#

I saw your site. I'd like to make a AI bot like you.

maiden fable
#

Wait, which site u talking about? I never made any website for my bot

dusk pumice
#

like this site

maiden fable
#

Ah

#

Medium one

dusk pumice
#

Yep

maiden fable
#

Haha I suggest u delete that link from here

dusk pumice
#

It's so good

maiden fable
#

Thanks ๐Ÿ˜„

dusk pumice
#

opps

#

got to go

maiden fable
#

Uhh @brazen seal???

brazen seal
#

Can you wait please? Im busy now

maiden fable
#

Ah sure

supple plume
#

if anyone is good with pymongo lmk as i have a question.

maiden fable
drifting arrow
#

AAHH I give up on buttons ;-;

#

imma just make tic-tac-toe without buttons.

maiden fable
#

Oof

#

Wait, wht

drifting arrow
#

wot

maiden fable
#

tic tac toe? There is an example for the same in the examples directory ๐Ÿคฃ

drifting arrow
#

ree

maiden fable
#

Yea

dusk pumice
#

Oh tic tec

#

I'd like to make that one.

supple plume
#

oops didnt mean to reply to you

maiden fable
supple plume
supple plume
#

its hard to explain tbh

maiden fable
dusk pumice
#

Oh thanks. Thank you so much

#

And I'll have to go in a min..

maiden fable
#

Take care!

dusk pumice
#

Tnx

#

And I guess U know something about discord slash command? Do you have any sample codes?

#

My code doesn't work.

dusk pumice
#

Me just importing it and using anothor thing like discord-py-slash-command

supple plume
#

ah

dusk pumice
#

If import is fork than I can say yes

maiden fable
lament mesa
dusk pumice
#

yea

dusk pumice
#

so i'm using discord-py-slash-commands

supple plume
maiden fable
#

I have made slash command, user command, message command and text command for my AI Bot with disnake

drifting arrow
supple plume
#

guess no one knows about my question then ๐Ÿ˜†

maiden fable
dusk pumice
#

-<

maiden fable
#

the only thing I know is to use motor cz pymongo is blocking ๐Ÿ˜†

boreal ravine
#

Welcome to fact or cap where we test-

drifting arrow
#

@maiden fable will probs use this tic-tac-toe thing as the example to do other stuff

supple plume
maiden fable
#

BTW at last I have add another thing to the bot. Now anyone can talk to the bot in their own language ๐Ÿ˜„

maiden fable
boreal ravine
#

a pastebin

maiden fable
drifting arrow
#

How you translating what they're saying then? You'd need some sort of translator right? or did you just add an alias for all languages? ๐Ÿค”

maiden fable
dusk pumice
#

you make everything your own hunter?

drifting arrow
#

but you are using some sort of translator right? like google.translate? @maiden fable ?

maiden fable
unkempt canyonBOT
dusk pumice
#

Is there any library for trans?
I thonght of selea.... (whatever)

drifting arrow
#

Yeah, i thought you were.

#

you'd have to use something to translate the stuff

slate swan
#

can i make auto login to tokens and vote in top.gg for discord bots?

slate swan
#

ok

maiden fable
dusk pumice
#

opps

drifting arrow
drifting arrow