#General Help

1 messages Β· Page 21 of 1

slender lintel
#

Could you explain again? sorry

half marsh
#

on your modal subclass on init add this

def __init__(self, bot):
    self.bot = bot
slender lintel
half marsh
#

then on your modal_send

half marsh
slender lintel
#

super().__init__(*args, **kwargs) here?

half marsh
#
class Suggestions(discord.ui.Modal):
    def __init__(self, bot, *args, **kwargs) -> None:
        self.bot = bot
        super().__init__(*args, **kwargs)
slender lintel
#

oh okay

#

srry

half marsh
#

its okay

#

but really man, you have to understand the basic

#

having discord bot as beginner project is not good

slender lintel
#
from discord.commands import slash_command
from discord.ext.commands import Cog

class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot
class Suggestions(discord.ui.Modal):
    def __init__(self, *args, **kwargs) -> None:
        self.bot = bot
        super().__init__(*args, **kwargs)

        
        self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
     suggest = discord.Embed(title=f"{interaction.user} Suggested ")
     suggest.add_field(name="Your Suggestion", value=self.children[0].value)
     suggest.add_field(name="Message id:{message.id}", value=self.children[0].value)
     channel = self.get_channel(964130201514692628)
     await channel.send(embeds=[Suggestions])

    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
            modal = Suggestions(title="text")
            await ctx.send_modal(modal,(self.bot))
def setup(bot):
    bot.add_cog(Suggest(bot))``` Bot is not defined, I litearly have defined bot
half marsh
#

why is it looks messy now

sudden path
#

Why the hell the modal is inside the cog class

frigid lark
slender lintel
#
import discord
from discord.commands import slash_command
from discord.ext.commands import Cog


class Suggestions(discord.ui.Modal):
    def __init__(self, *args, **kwargs) -> None:
        self.bot = self.bot
        super().__init__(*args, **kwargs)

        
        self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
     suggest = discord.Embed(title=f"{interaction.user} Suggested ")
     suggest.add_field(name="Your Suggestion", value=self.children[0].value)
     suggest.add_field(name="Message id:{message.id}", value=self.children[0].value)
     channel = self.get_channel(964130201514692628)
     await channel.send(embeds=[Suggestions])
class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot
    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
            modal = Suggestions(title="text")
            await ctx.send_modal(modal,(self.bot))
def setup(bot):
    bot.add_cog(Suggest(bot))```
#

Wrong code

frigid lark
#

And he dont use `py

slender lintel
half marsh
half marsh
#

also this

channel = self.get_channel(964130201514692628)

should be

channel = self.bot.get_channel(964130201514692628)
#

this one aswell

await ctx.send_modal(modal,(self.bot))

should be

await ctx.send_modal(Suggestions(self.bot))
#

so to this one

await channel.send(embeds=[Suggestions])

->

await channel.send(embed=suggest)
slender lintel
#
import discord
from discord.commands import slash_command
from discord.ext.commands import Cog


class Suggestions(discord.ui.Modal):
    def __init__(self, bot, *args, **kwargs) -> None:
        self.bot = bot
        super().__init__(*args, **kwargs)

        
        self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
     suggest = discord.Embed(title=f"{interaction.user} Suggested ")
     suggest.add_field(name="Your Suggestion", value=self.children[0].value)
     suggest.add_field(name="Message id:{message.id}", value=self.children[0].value)
     channel = self.bot.get_channel(964130201514692628)
     await channel.send(embeds=[Suggest])
class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot
    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
            modal = Suggestions(title="text")
            await ctx.send_modal(Suggestions(self.bot))
def setup(bot):
    bot.add_cog(Suggest(bot))``` same error
#

@half marsh

half marsh
#

read what i have send you

frigid lark
slender lintel
#

sorry lmao i dont see the need to notice that but ig i do now

half marsh
slender lintel
slender lintel
slender lintel
#

I have fixed Suggest

half marsh
slender lintel
#

Traceback (most recent call last):
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 26, in on_application_command_error
raise error
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 993, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 357, in invoke
await injected(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 134, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: Suggestions.init() missing 1 required positional argument: 'bot'

#

@half marsh

half marsh
#

huh

slender lintel
#

I have that error

#
import discord
from discord.commands import slash_command
from discord.ext.commands import Cog


class Suggestions(discord.ui.Modal):
    def __init__(self, bot, *args, **kwargs) -> None:
        self.bot = bot
        super().__init__(*args, **kwargs)

        
        self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
     suggest = discord.Embed(title=f"{interaction.user} Suggested ")
     suggest.add_field(name="Your Suggestion", value=self.children[0].value)
     suggest.add_field(name="Message id:{message.id}", value=self.children[0].value)
     channel = self.bot.get_channel(964130201514692628)
     await channel.send(embeds=[suggest])
class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot
    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
            modal = Suggestions(title="text")
            await ctx.send_modal(Suggestions(self.bot))
def setup(bot):
    bot.add_cog(Suggest(bot))```
half marsh
#

remove this line

modal = Suggestions(title="text")
slender lintel
#

alr

half marsh
#

edit this line

await ctx.send_modal(Suggestions(self.bot, title="text"))
obsidian garnet
#

One message removed from a suspended account.

slender lintel
half marsh
#

now do the self.message

#

i believe you can do it your own

slender lintel
#

oh yeah

slender lintel
#

is it suggest.set_footer

#

i saw on docs lol

half marsh
slender lintel
#

yay

slender lintel
#

also, ```py
import discord
from discord.commands import slash_command
from discord.ext.commands import Cog

class Suggestions(discord.ui.Modal):
def init(self, bot, *args, **kwargs) -> None:
self.bot = bot
super().init(*args, **kwargs)

    self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

async def callback(self, interaction: discord.Interaction):
 suggest = discord.Embed(title=f"{interaction.user} Suggested ")
 suggest.add_field(name="Your Suggestion", value=self.children[0].value)
 suggest.set_footer(text="Message id:{self.message_id}")
 channel = self.bot.get_channel(964130201514692628)
 await channel.send(embeds=[suggest])

class Suggest(Cog):
def init(self,bot):
self.bot = bot
@slash_command(name="suggest", description="suggestions")
async def modal_slash(self,ctx: discord.ApplicationContext):
await ctx.send_modal(Suggestions(self.bot,title="Suggestion"))
def setup(bot):
bot.add_cog(Suggest(bot))``` It says something went wrong in modal but it still sends

frigid lark
slender lintel
#

Oh okay (Sorry i tried message_id at first then was told to use self)

slender lintel
#

none worked

slender lintel
#

@frigid lark @half marsh

half marsh
#

shit sori sori

#

do the same like you passing bot

#

but now it passes ctx.message to your suggestion class

slender lintel
half marsh
#

yes

slender lintel
#

wrong*

half marsh
slender lintel
half marsh
#

if you wanna be like this self.message_id

await ctx.send_modal(Suggestions(self.bot, ctx.message.id, title="Suggestion"))
slender lintel
#

Oh

half marsh
#

dont forget to add the param on suggestion init and add the attribute message_id

#

also f string

slender lintel
# half marsh dont forget to add the param on suggestion init and add the attribute `message_i...
import discord
from discord.commands import slash_command
from discord.ext.commands import Cog


class Suggestions(discord.ui.Modal):
    def __init__(self,message.id, bot, *args, **kwargs) -> None:
        self.bot = bot
        
        super().__init__(*args, **kwargs)

        
        self.add_item(discord.ui.InputText(label="Long Input", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
     suggest = discord.Embed(title=f"{interaction.user} Suggested ")
     suggest.add_field(name="Your Suggestion", value=self.children[0].value)
     suggest.set_footer(text="Message id:{interaction.message.id}")
     channel = self.bot.get_channel(964130201514692628)
     await channel.send(embeds=[suggest])
class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot
    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
            await ctx.send_modal(Suggestions(self.bot,ctx.message.id,title="Suggestion"))
def setup(bot):
    bot.add_cog(Suggest(bot))```
error
  raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: AttributeError: 'NoneType' object has 
no attribute 'id'
#

@half marsh

half marsh
#

aah modal does not send a message thonk

half marsh
#

also you doin f string btw

#

dont forget the F

slender lintel
slender lintel
half marsh
#

text=f"Message id:{interaction.message.id}"

frigid lark
slender lintel
slender lintel
slender lintel
#
        m = await interaction.response.send_message("Suggestion send!")
        suggest = discord.Embed(title=f"{interaction.user} Suggested ")
        suggest.add_field(name="Your Suggestion: ", value=self.children[0].value)
        suggest.set_footer(text=f"Message id: {m.id} ")
        channel = self.bot.get_channel(964130201514692628)
        await m.add_reaction("βœ”")
        await m.add_reaction("❌")
        await channel.send(embed=suggest)```
error
Traceback (most recent call last):
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\modal.py", line 260, in dispatch 
    await value.callback(interaction)
  File "C:\Users\jackd\Documents\Felbcord Py\Modals\Suggestions.py", line 17, in callback
    await m.add_reaction("βœ”")
AttributeError: 'Interaction' object has no attribute 'add_reaction
#

why do i get this?

slender lintel
#

anyone?

slender lintel
#

I'm trying to add reactions to an embed sent by a modal

slender lintel
#

O

slender lintel
slender lintel
#

what

#

how did you get to that ._.

#

Well if its send message wouldn't I replace it with add reaction

#

xD

slender lintel
#

I'm confused now

#

Look at what using this coroutine returns

#

It is an InteractionMessage

#

which inhereits from discord.Message

#

which has the attributes to add reactions

#

But how, could you give me an example I'm rly confused

#
interaction = await ctx.respond()
msg = await interaction.original_message()
await msg.add_reaction()```
#

Would I just have the msg var part in my case

slender lintel
# slender lintel ```py interaction = await ctx.respond() msg = await interaction.original_message...
        m = await interaction.response.send_message("Suggestion send!")
        suggest = discord.Embed(title=f"{interaction.user} Suggested ")
        suggest.add_field(name="Your Suggestion: ", value=self.children[0].value)
        suggest.set_footer(text=f"Message id: {m.id} ")
        channel = self.bot.get_channel(964130201514692628)
        await interaction.original_message()
        await m.add_reaction('βœ”')()
        await channel.send(embed=suggest)```
error:
Traceback (most recent call last):
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\modal.py", line 260, in dispatch 
    await value.callback(interaction)
  File "C:\Users\jackd\Documents\Felbcord Py\Modals\Suggestions.py", line 18, in callback
    await m.add_reaction('βœ”')()
AttributeError: 'Interaction' object has no attribute 'add_reaction'
#

btw there is an emoji in the ' ' but it didnt send

#

did

#

you

#

seriously not even read what i sent ._.

#

i did lol

#
m = await interaction.response.send_message("Suggestion send!")
await interaction.original_message()
await m.add_reaction('βœ”')()```
```py
interaction = await ctx.respond()
msg = await interaction.original_message()
await msg.add_reaction()```
#

compare them

toxic bluff
#

Really random one here, is there a way to check something before doing anything with an interaction or does it have to be at the start of an interaction

slender lintel
slender lintel
#

just dont have repeating variables I used that as an example

slender lintel
#

code*

toxic bluff
slender lintel
# slender lintel Yeah, but whats wrong in my msg?
m = await interaction.response.send_message("Suggestion send!")
msg = await m.original_message()
await msg.add_reaction('βœ”')``` 

1. You didn't get the original message from the interaction you wanted
2. The InteractionMessage wasnt even stored in variable.
slender lintel
toxic bluff
cyan olive
#

How do you get an Invite from a url?

slender lintel
toxic bluff
slender lintel
#

I tried using suggest.add_reaction ect but never worked

#

@slender lintel

#

think im being ignored

slender lintel
slender lintel
#

If suggest. wont work, what would i use?

slender lintel
#

so set that to a variable

#

since that isnt an interaction object

#

... i have channel.send(embed=suggest)

#

itll have the add_reaction attribute

slender lintel
slender lintel
sleek grove
#

i can't use prefixed commands$

slender lintel
#

embed is not defined

slender lintel
#

You may be overwritding it with an message event

sleek grove
slender lintel
#

^

slender lintel
slender lintel
#

oh no hold up

slender lintel
#

ctx.send() is a coroutine

sleek grove
#

it have await but a friend just deleted it when i copied it

#

bot = discord.Bot(command_prefix = "!", intents=discord.Intents.all())

#

here is my bot

slender lintel
#
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\modal.py", line 260, in dispatch 
    await value.callback(interaction)
  File "C:\Users\jackd\Documents\Felbcord Py\Modals\Suggestions.py", line 17, in callback
    embed = await channel.send(embed=suggest)
AttributeError: 'NoneType' object has no attribute 'send'
slender lintel
sleek grove
#

yes

slender lintel
#

It isnt

slender lintel
sleek grove
slender lintel
#
    async def callback(self, interaction: discord.Interaction):
        m = await interaction.response.send_message("Suggestion send!")
        suggest = discord.Embed(title=f"{interaction.user} Suggested ")
        suggest.add_field(name="Your Suggestion: ", value=self.children[0].value)
        suggest.set_footer(text=f"Message id: {m.id} ")
        channel = self.bot.get_channel(987396375069224960)
        embed = await channel.send(embed=suggest)
        msg = await embed.original_message()
        await msg.add_reaction('βœ”')
#

you dont need

#

to get the original message

#

thats not an interaction

#

on msg -?

#

msg=?

#

mhm

#

just do await embed.add_reaction

#

okay

steep verge
slender lintel
# sleek grove ?

im not sure but would time.sleep() be blocking everything else?

steep verge
#

It’s message.add_reaction

slender lintel
#

no

steep verge
#

Oh they have the variable set to embed

slender lintel
# sleek grove ?

time.sleep() is a synchronous. You should use await asyncio.sleep()

slow dome
slender lintel
#

works now

slender lintel
sleek grove
#

so the command is defined as a prefixed command but only work as a slash command

#

help pls

slow dome
#

discord.Bot.command() is an alias for discord.Bot.slash_command()

sleek grove
#

ok

#

so do i have to do it with the message event

#

hm but the docs say it the same way that i do it

#

?

slow dome
#

but your current slash commands should also be renamed to slash_command

sleek grove
#

ok

#

and in a cog?

slow dome
#

discord.slash_command()

sleek grove
#

sorry i mean a prefix command

slow dome
#

@commands.command()

sleek grove
#

ok

slender lintel
#

can I make an if query NotFound?
I tried it like this:```Py
if NotFound is True:
return

But it doesn't work..
It would work with try & except but there would be a different error handling..
sleek grove
# slow dome `@commands.command()`

import discord
import random
from discord.ext import commands

class Moderation_normal(commands.Cog):
def init(self, bot):
self.bot = bot

@commands.command()
async def random(self, ctx):
    random1 = random.randint(0, 10)
    await ctx.respond(random1)

def setup(bot):
bot.add_cog(Moderation_normal(bot))

#

this is my code

#

but i have a error

#

ExtensionFailed: Extension 'cogs.moderation.moderation-normal' raised an error: AttributeError: 'Bot' object has no attribute 'add_command'

slow dome
#

go in the terminal and type pip list

#

you may have more than one using the discord namespace

sleek grove
#

aiodns 3.0.0
aiohttp 3.8.1
aiosignal 1.2.0
async-timeout 4.0.2
attrs 21.4.0
brotlipy 0.7.0
cchardet 2.1.7
cffi 1.15.0
charset-normalizer 2.0.12
frozenlist 1.3.0
idna 3.3
multidict 6.0.2
orjson 3.7.2
pip 22.1.2
py-cord 2.0.0rc1
pycares 4.1.2
pycparser 2.21
PyNaCl 1.5.0
setuptools 60.2.0
wheel 0.37.1
yarl 1.7.2

fallow fulcrum
#

how do i get the message id that someone replied to

sleek grove
#

do you found the error?

sleek grove
slender lintel
#

Do roles ping if they're in an embed

slate stirrup
slender lintel
#

?tag install

hearty rainBOT
#
  1. Uninstall discord.py or any other forks of discord.py you might have with the namespace discord.
    python -m pip uninstall discord.py discord -y

  2. Install py-cord
    python -m pip install py-cord

Installing other builds:
Note: You need to have git installed. Use !git to find out how to install git.

Updating the module to Alpha (unstable):
pip install -U git+https://github.com/Pycord-Development/pycord

Updating to release candidate:
pip install py-cord==2.0.0rc1

slender lintel
#

hey what one is beta?

slate stirrup
#

The last one

slender lintel
#

i need alpha

#

is alpha 2.0.0?

slate stirrup
#

Yep

#

From github

slender lintel
#

ok

slate stirrup
#

Copy paste

slender lintel
#

ok

slate stirrup
#

But it's unstable be aware

slender lintel
#

ok ik

agile roost
#

AttributeError: module 'pycord.wavelink' has no attribute 'Client'

slender lintel
#
    @discord.ui.button(label="Click me!", style=discord.ButtonStyle.url)
    async def button_callback(self, button, interaction):
        await interaction.response.send_message("You clicked the button!")``` where am i meant to put the link if im doing a link button?
glass dawn
#

not a pycord question, but a discord one... its posible to enable this "forum" like thing on normal servers?

slow dome
#

b!trtfm pyc button.url

#

b!rtfm pyc button.url

slender lintel
slow dome
#

@discord.ui.button(label="Click me!", style=discord.ButtonStyle.url,url="https://findingfakeurlsisprettyhard.tv")

slender lintel
#

oh alr

slender lintel
# slow dome `@discord.ui.button(label="Click me!", style=discord.ButtonStyle.url,url="https:...

@discord.ui.button(label="Github Link", style=discord.ButtonStyle.url,url="https://github.com/VividBlue1/Felbcord-Py") why isnt it working? (error:)

Traceback (most recent call last):
  File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 15, in <module>
    bot.load_extension(f"{directory[2:]}.{filename[:-3]}")
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\cog.py", line 787, in load_extension    self._load_from_module_spec(spec, name)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\cog.py", line 718, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'commands.info' raised an error: TypeError: button() got an unexpected keyword argument 'url'
PS C:\Users\jackd\Documents\Felbcord Py> ```
slow dome
#

link

#

not url

slender lintel
#

oh

slow dome
#

sorry

slender lintel
# slow dome sorry

@discord.ui.button(label="Github Link", style=discord.ButtonStyle.link,url="https://github.com/VividBlue1/Felbcord-Py")

#

did i change the wrong url

slow dome
#

because link buttons don't have a callback

slender lintel
#
discord.errors.ExtensionFailed: Extension 'commands.info' raised an error: TypeError: button() got an unexpected keyword argument 'url'```
#

if i change it to link, same error but w link

slow dome
#

well, I creating it by subclassing discord.ui.Button

#
class Invite(discord.ui.Button):
    def __init__(self):
        super().__init__(
            label='Discord',
            style=discord.ButtonStyle.link,
            url="https://discord.com/",
            row=1)
slender lintel
# slow dome ```py class Invite(discord.ui.Button): def __init__(self): super()._...
import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.ext.commands import Cog
import discord.ui 
class Github(discord.ui.View):
    def __init__(self):
        super().__init__(
            label='Github Link',
            style=discord.ButtonStyle.link,
            url="https://github.com/VividBlue1/Felbcord-Py",
            row=1)
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    await ctx.respond(embed=embed, view=Github)
def setup(bot):
    bot.add_cog(infoCog(bot))```
    await ctx.command.invoke(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 357, in invoke
    await injected(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 134, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: View.to_components() missing 1 required positional argument: 'self'
slow dome
#

full traceback, thank you

slender lintel
# slow dome full traceback, thank you

Traceback (most recent call last):
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 26, in on_application_command_error
raise error
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 993, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 357, in invoke
await injected(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 134, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: View.to_components() missing 1 required positional argument: 'self'

slow dome
#

Confirming you are on rc1?

slender lintel
#

?tag install

hearty rainBOT
#
  1. Uninstall discord.py or any other forks of discord.py you might have with the namespace discord.
    python -m pip uninstall discord.py discord -y

  2. Install py-cord
    python -m pip install py-cord

Installing other builds:
Note: You need to have git installed. Use !git to find out how to install git.

Updating the module to Alpha (unstable):
pip install -U git+https://github.com/Pycord-Development/pycord

Updating to release candidate:
pip install py-cord==2.0.0rc1

fallow fulcrum
#

is there a way to set like an icon url in embed to a add_field element

#

or in header

slender lintel
#

yes

fallow fulcrum
#

how

slender lintel
#

embed.set_image(url='link')

fallow fulcrum
#

ok lemme try

#

is there a way to make it small like footer

slender lintel
#

like a tumbnmail?

slender lintel
#

what exactly is your goal

slender lintel
slender lintel
#

BRUH

#

?

#

u dont know how to fix?

#

no

#

just add self

#

i mean i would if i knew what line

#

show code

slender lintel
#

do u know why

#

@slender lintel

slow dome
#
view = discord.ui.View()
view.add_item(Github())
slender lintel
#

Thanks

slow dome
#

then

#
await ctx.respond(embed=embed, view=view)
slender lintel
#

Thanks

slender lintel
# slow dome ```py await ctx.respond(embed=embed, view=view) ```
import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.ext.commands import Cog
import discord.ui 
class Github(discord.ui.Button):
    def __init__(self):
        super().__init__(
            label='Github Link',
            style=discord.ButtonStyle.link,
            url="https://github.com/VividBlue1/Felbcord-Py",
            row=1)
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    await ctx.respond(embed=embed, Button=Github)
def setup(bot):
    bot.add_cog(infoCog(bot))```
#

Traceback (most recent call last):
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 26, in on_application_command_error
raise error
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 993, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 357, in invoke
await injected(ctx)
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 134, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: InteractionResponse.send_message() got an unexpected keyword argument 'Button'

slow dome
#

can you do what I said to do?

slender lintel
slender lintel
#

it hasnt happened yet, but i dont want it too happen

slender lintel
solar berry
#

Is it possible to wait_for an audit log?

slow dome
hearty rainBOT
#

dynoError No tag discord.utils. found.

slow dome
#

b!rtfm pyc discord.utils

slow dome
slow dome
#
view = discord.ui.View()
view.add_item(Github())
await ctx.respond(embed=embed, view=view)
slender lintel
slender lintel
slow dome
slender lintel
#

So like await discord utils ect

slow dome
#

it's not a coro

reef dove
#
class DiscordColorField(fields.IntField):
    def __init__(self, default=settings.colors.embeds, **kwargs):
        super().__init__(default=default, **kwargs)
        self.validators.extend([MinValueValidator(0x000000), MaxValueValidator(0xFFFFFF)])  

    def to_python_value(self, value: int) -> discord.Colour:
        return discord.Colour(value)
slow dome
#

so what did you do for this error

reef dove
#

while i try to create a table in my db

#

it won't let me select .. which is weird

#

but if i edit it after the table is created it will let me edit the color..

#
class WelcomerModel(Model):

    guild: fields.OneToOneRelation[GuildModel] = fields.OneToOneField('Bot.GuildModel', pk=True)
    channel: fields.OneToOneRelation[ChannelModel] = fields.OneToOneField(
        'Bot.ChannelModel', on_delete=fields.SET_NULL, null=True
    )
    channel_id: int
    message = fields.TextField(default='Hey $user_mention', validators=[MaxLengthValidator(2048)])
    embed = fields.BooleanField(default=False)
    ping = fields.BooleanField(default=True)
    footer = fields.TextField(default='Spooky Welcomer', validators=[MaxLengthValidator(50)])
    title = fields.TextField(default='Welcome to $server', validators=[MaxLengthValidator(256)])
    color = DiscordColorField()
    auto_delete = fields.IntField(default=0, validators=[MaxValueValidator(120)])

    @classmethod
    async def dispatch_for(cls, member: discord.Member) -> discord.Message:
        """Sends the welcome message to the member provided"""

        guild: discord.Guild = member.guild
        m = await cls.get(guild_id=guild.id)

        re = MessageReplacer(member)
        embed = discord.Embed(
            title=re(m.title), description=re(m.message), colour=m.color
        ).set_footer(text=re(m.footer))

        content = member.mention if m.ping else None

        if not m.embed:
            content = re(m.message)
            embed = None

        # noinspection PyTypeChecker
        return await guild.get_channel(m.channel_id or guild.system_channel.id).send(
            content=content,
            embed=embed,
            delete_after=da if (da := m.auto_delete) else None,
        )
#

this is my welcomer model

slow dome
#

hang on, let me try and understand it lol

reef dove
#

what's even more weird

#

i tried printing the value

#

and it is a hex...

#

the issue is at exactly line 25

#

where im returning the color

#

returning discord.color and the hex

slow dome
#

well, it should be raw integer value

slender lintel
slow dome
#

it's a function

#

just everything without the await

slender lintel
slow dome
#

how do I know if I don't know the code

slender lintel
#

Oh yeah.. Forgot about that

#

I'll send it sometime tomorrow

slow dome
#

it's on that github repo right?

reef dove
#

i tried printing the type of value

slender lintel
#

Oh yeah it is

reef dove
#

and value was already a color

#

so im just returning value

#

it works now

slow dome
reef dove
#

oh yeah i seen in general someone said that we can flag nsfw commands

#

how can i do that?

slender lintel
slow dome
slender lintel
#

Btw it hasn't been updated but the say file is good

reef dove
#

@slow dome

slender lintel
vivid nacelle
slender lintel
vivid nacelle
#

that isn't meant

slender lintel
#

o

vivid nacelle
#

they want to hide the commands completely in none-nsfw channels

slender lintel
#

ah ok that makes sense

#

Is it possible to grey slash commands out that the user dosrnt have permissions to

slow dome
slender lintel
#

Wym

slender lintel
slow dome
#

I sent a github pull request containing how to do that.

vivid nacelle
slender lintel
#

Oh thanks just got an email for it lol

slender lintel
slender lintel
#

sorry

#

i was gone

#

?tag lavalink host

hearty rainBOT
#

dynoError No tag lavalink found.

languid hollow
#

Can someone please explain what this does please

slender lintel
#

read what it dose

#

it says what it dose in the docs

solar berry
#

Is it possible to upload a file directly to an embed?

#

Or does it have to be an URL

halcyon cairn
#

Not sure if this works in an embed ( I've only used for normal messages ) but you could try:

discord.File("FileName.jpg")
#

@solar berry

#

Just keep in mind, the file has to be in the same directory as the bot.

solar berry
#

Yea I know you can send files like that, but idk about embeds

solar berry
#

Oof

frigid lark
solar berry
#

kinda copy pasted the code .-.

slender lintel
#

how do i check if a user dosent enter value

#

for wavelink

#
    async def volume(self, ctx, volume: int):
        """Change the volume of the song"""

        if ctx.author.voice is None:
            return await ctx.send("You are not in a voice channel")

        elif not ctx.voice_client:
            return await ctx.send("You are not playing any music")

        else:
            vc: wavelink.Player = ctx.voice_client

        await vc.set_volume(volume)
        embed = discord.Embed(
            title="Volume changed", description=f"I have successfully updated the volume to {volume}%", color=embed_color)

        await ctx.send(embed=embed)
#

so i have this

#

but i need to check if the user enters a number or not

#

wait nvm

outer valley
#

how can i get last message from a user

slender lintel
#

hey how can it make it possible to change the language and once you have done that the commands are only in this language?

slender lintel
#

yes

#

so if it detects a "unknown launge " deletes it or translates

slender lintel
slow dome
#

interaction.edit_original_message()

drifting spindle
#

Example:-

 embed.set_image(url='./images/example.png')
#

You can't store a response with a var

#

If you want to edit the interaction you can do like this

await interaction.response.send_message()
#When you want to edit
await interaction.edit_original_message()
solar berry
drifting spindle
#

Your msg is deleted

#

Ok

#

now i see

drifting spindle
sleek grove
terse plinth
#

how do i change my bots activity and presence? i was told not to use the on_ready event for this

#

i dont know the syntax to pass it into the client definition

sleek grove
#

@bot.event
asnyc def on_ready():
await bot.change_presence(status=discord.Status.idle, activity=discord.Game(name="mentition for help"))

craggy rapids
#

btw is there any way to show like pinging a role without pinging people with that role?

terse plinth
#

nope

red tendon
#

b!rtfm pyc AllowedMention

sleek grove
red tendon
sleek grove
#

yes

#

wait a min

#

import discord
import random
from discord.ext import commands

class Moderation_normal(commands.Cog):
def init(self, bot):
self.bot = bot

@commands.command()
async def random(self, ctx):
    random1 = random.randint(0, 10)
    await ctx.respond(random1)

def setup(bot):
bot.add_cog(Moderation_normal(bot))

#

ExtensionFailed: Extension 'cogs.moderation.moderation-normal' raised an error: AttributeError: 'Bot' object has no attribute 'add_command'

red tendon
sleek grove
#

so def init

red tendon
sleek grove
#

where?

red tendon
#

make sure you dont have bot = discord.Bot(...)

#

main*

sleek grove
#

yes

red tendon
#

ok good and now you can try again

sleek grove
#

hm i have same error

#

i changed all you said

red tendon
sleek grove
sleek grove
#

that is all

red tendon
sleek grove
#

ah

#

wait

#

i don't have a error anymore but the command just don't work

red tendon
#

add the last line i added, make sure is the same indent

sleek grove
#

ok

#

works

#

thanks

#

thanks

#

i love you all

#

<33

#

❀️

red tendon
#

np :D

sleek grove
#

:DDDDDDD

tidal beacon
#

does anyone know how to generate an application callback url for a discord bot

sleek grove
#

i have another question

#

i copied my slash command and now i have the problem that the prefix command dowsn't works

slender lintel
#

I am running /say e and its saying this in discord (not console)

<function escape_mentions at 0x000002BC99A6E5F0>

code:

import discord
from discord.ext import commands
from discord import slash_command
from discord.ext.commands import Cog

class sayCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="say", description="Says user response")
  @commands.cooldown(1,20, commands.BucketType.user)
  async def say(self, ctx, message):
        message = discord.utils.escape_mentions
        await ctx.respond(message)
        await ctx.respond('I have sent this.', ephemeral=True)
def setup(bot):
    bot.add_cog(sayCog(bot))```
solar berry
#

Is there a way to make the message cache timed, or per channel/guild?

slender lintel
# slow dome Github is a button, not a view
import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.ext.commands import Cog
import discord.ui 
class Github(discord.ui.View):
    def __init__(self):
        super().__init__(
            label='Github Link',
            style=discord.ButtonStyle.link,
            url="https://github.com/VividBlue1/Felbcord-Py",
            row=1)
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    view = discord.ui.View()
    view.add_item(Github())
    await ctx.respond(embed=embed, view=view)
def setup(bot):
    bot.add_cog(infoCog(bot))``` Isnt responding, no error
#

@slow dome

#

u able to help? (since u helped last night)

grave wraith
#

Is it possible to localize application commands yet?

grave wraith
slender lintel
grave wraith
slender lintel
#

ty

slender lintel
#

@grave wraith

slender lintel
#

Wym?

grave wraith
#

what you're stating with message = discord.utils.escape_mentions is that now the message is referencing this function. It's like doing p = print. You still have to call the function to execute it, like p("Hello World")

slender lintel
grave wraith
slender lintel
#

Its confused me more lol

grave wraith
#

tell me what you didn't understand

slender lintel
grave wraith
#

yeah, because there many things which aren't done right in your code

zinc saffron
#

I am using choices in my slash commands and I was wondering how can I return the name?

A code example would be:

projects = [
    OptionChoice(name='Test1', value=2293471650),
    OptionChoice(name='Test2', value=2293471688),
]

The value I can easily get, however I am unable to return name.

grave wraith
slender lintel
#

alr

grave wraith
slender lintel
#
from os import link
import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.ext.commands import Cog
import discord.ui 
class Github(discord.ui.View):
    def __init__(self,bot):
        super().__init__()
        self.bot = bot
        # We need to quote the query string to make a valid url. Discord will raise an error if it isn't valid.
        url = f"https://github.com/VividBlue1/Felbcord-Py"

        # Link buttons cannot be made with the
        # decorator, so we have to manually create one.
        # We add the quoted url to the button, and add the button to the view.
        self.add_item(discord.ui.Button(label="Github Link", url=url))
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    await ctx.respond(embed=embed, view=Github)
def setup(bot):
    bot.add_cog(infoCog(bot))``` It says i am missing 'self' but where? it dosent tell me in the error
grave wraith
#

could you send the traceback of your error please?

slender lintel
#
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event 
    await coro(*args, **kwargs)
  File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 26, in on_application_command_error
    raise error
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 993, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 357, in invoke
    await injected(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 134, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: TypeError: View.to_components() missing 1 required positional argument: 'self'```
grave wraith
#

you need to call Github

#

Like view=Github() and not just view=Github

slender lintel
grave wraith
#

no

slender lintel
slender lintel
grave wraith
#

I would highly recommend to you to learn some python basics, because that's just how python works

grave wraith
slender lintel
# grave wraith as I stated here in your `view=Github()`
    def __init__(self,bot):
        super().__init__()
        view=Github()
        url = f"https://github.com/VividBlue1/Felbcord-Py"

        self.add_item(discord.ui.Button(label="Github Link", url=url))
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    await ctx.respond(embed=embed, view=Github)
def setup(bot):
    bot.add_cog(infoCog(bot))``` Done so, same error
slender lintel
grave wraith
#

I ment at your ctx.respond

slender lintel
#

missing bot parm

grave wraith
slender lintel
grave wraith
#

Github

slender lintel
# grave wraith just put the bot out of the `__init__ `
    def __init__(self,bot):
        super().__init__()
        url = f"https://github.com/VividBlue1/Felbcord-Py"

        self.add_item(discord.ui.Button(label="Github Link", url=url))
class infoCog(Cog):
  def __init__(self, bot):
    self.bot = bot``` where would i change here cause it cant go any further unidented
zinc saffron
zinc saffron
grave wraith
slender lintel
# grave wraith just remove of the parameters

So remove 'bot' in the parms like this?

from os import link
import discord
from discord.ext import commands
from discord.commands import slash_command
from discord.ext.commands import Cog
import discord.ui 
class Github(discord.ui.View):
    def __init__(self,bot):
        super().__init__()
        url = f"https://github.com/VividBlue1/Felbcord-Py"

        self.add_item(discord.ui.Button(label="Github Link", url=url))
class infoCog(Cog):
  def __init__(self):
    self.bot = bot

  @slash_command(name="info",description="Gives infomation and command info about the bot")
  async def info(self,ctx):
    embed=discord.Embed(title="Bot Info", description="Hello! Here is some useful infomation about me.\n I run through slash commands and i am created by jack. here is my commands \n  **/ping** | Sends the bots ping \n **/nick** `member` `name`| Changes the members nickname  \n **/bean** `member` `reason` | Bans and unbans a user \n **/dm** `member` `message`  | DM's a member \n **/ban** `member` `reason` | Bans a member \n **/kick** `member` `reason` | Kicks a member \n **/addslowmode** `channelid` `seconds` | Changes channel slowmode \n **/say** `message` | Sends a mesage with the bot", color=discord.Color.blue())
    await ctx.respond(embed=embed, view=Github())
def setup(bot):
    bot.add_cog(infoCog(bot))```
grave wraith
grave wraith
slender lintel
#

ty

grave wraith
#

You're welcome

#

I would still recommend learning the python basics first

slender lintel
grave wraith
#

perfect

zinc saffron
grave wraith
#

Gerne :^)

languid hollow
#

#987472906676211763 I presume no ones got a solution for that?

grave wraith
#

let me see

zinc saffron
grave wraith
#

yes

#

if you want the name, just use selectedOptionChoice.name

slender lintel
#
@bot.event
async def on_member_join(member):
    channel = ('965533467557371947')
    welcomed = discord.Embed(title='Welcome to the felbcord',description='Hello! You can go talk in #964126155525468222 and collect some roles in other channels too!')
    channel.send(embed=welcomed)``` Why wont this event work? (Using the docs)
grave wraith
#

first of all: channel can't be used that way

slender lintel
grave wraith
#

First you make sure that the member joined the right guild

slender lintel
#

I dont have a set guild? (I thought id have to use a database to have it for per guild)

grave wraith
#

then you could make channel = member.guild.get_channel(<CHANNEL_ID>)

grave wraith
slender lintel
grave wraith
#

I still didn't get it

zinc saffron
slender lintel
#

I thought that event would send to the channel when anyone joins any server the bot is in

grave wraith
grave wraith
slender lintel
grave wraith
#

yup

slender lintel
#

Ok

grave wraith
#

you could use bot.get_channel(<YOUR ID>) if you want it independent of the guild

sleek grove
#

Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "setprefix" is not found

#

guys i have a error

slender lintel
#

Show code bruh

sleek grove
#

@commands.command(pass_context=True)
@commands.has_permissions(administrator=True)
async def setprefix(ctx, *, prefix):
if len(prefix) <= 2:
with open('data/prefixes.json', 'r') as f:
prefixes = json.load(f)

    prefixes[str(ctx.guild.id)] = prefix

    with open('data/prefixes.json', 'w') as f:
        json.dump(prefixes, f, indent=4)

    await ctx.send(f'''Prefix changed to: "**{prefix}**"''')
else:
    await ctx.send(f"Couldn't set the Prefix to **", {prefix}, "**. The maximum lenght for a Prefix is 2!")
grave wraith
#

Is that command in a cog?

sleek grove
#

no

slender lintel
grave wraith
#

yes

slender lintel
grave wraith
#

no that would work on every server

#

as far as I know

slender lintel
#

Would i need a database for per guild stuff

grave wraith
slender lintel
#

would this work

slender lintel
# grave wraith yeah you could just check if member.guild.id == your_guild_id

so if i changed it to

@bot.event
async def on_member_join(member):
     member.guild.id == (guildid)
    channel = bot.get_channel(964127184769933382)
    welcomed = discord.Embed(title='Welcome to the felbcord',description='Hello! You can go talk in #964126155525468222 and collect some roles in other channels too!')
    await channel.send(embed=welcomed)```
grave wraith
#

there is no if

slender lintel
#

so

@bot.event
async def on_member_join(member):
 if member.guild.id == (guildid)
    channel = bot.get_channel(964127184769933382)
    welcomed = discord.Embed(title='Welcome to the felbcord',description='Hello! You can go talk in #964126155525468222 and collect some roles in other channels too!')
    await channel.send(embed=welcomed)```
zinc saffron
#

Am I able to increase the timeout without using await ctx.defer()?

atomic thistle
#

How do I respond twice to an interaction? The Interaction.followup doesn't work. It gives the following error

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ui\modal.py", line 217, in dispatch
    await value.callback(interaction)
  File "F:\Coding related files\APIs\Discord Bot\Embed Bot\classes.py", line 140, in callback
    await interaction.followup.send("The URL for footer icon must start with `http` or `https`", ephemeral=True)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\webhook\async_.py", line 1546, in send
    data = await adapter.execute_webhook(
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\webhook\async_.py", line 211, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10015): Unknown Webhook
sleek grove
#

i alwais have a error by using prefix command

#

Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "meme" is not found

atomic thistle
ornate fog
#

same error ?

atomic thistle
#

wait

#

AttributeError: 'Webhook' object has no attribute 'send_message'
Giving this error when I used send_message

It was giving the earlier error which I used send

ornate fog
#

100% sure ?

#

like 10000%

atomic thistle
#

wait

#
try:
  await interaction.response.edit_message(embed = embed)
except:
  await interaction.followup.send("The URL for footer icon must start with `http` or `https`", ephemeral=True)
ornate fog
#

well obviously your eddit message fails because something is wrong and you dont respond to the interaction
Then you do followup and the code errors.
dont use bare except that is the exact reason.

atomic thistle
#

Well, there was another error too,
In embeds.0.footer.icon_url: Scheme "regdesfb" is not supported. Scheme must be one of ('http', 'https').

ornate fog
#

yea there it is

atomic thistle
#

I was the one testing the bot, so I just entered the random text, which bot set as the embed's author's url. So, that error came

ornate fog
#

your embed boddy is wrong so discord does not acknowledge
the interaction response

atomic thistle
#

but, if I used interaction.response.send_message in in the except block, It gives this error

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ui\modal.py", line 217, in dispatch
    await value.callback(interaction)
  File "F:\Coding related files\APIs\Discord Bot\Embed Bot\classes.py", line 140, in callback
    await interaction.response.send_message("The URL for footer icon must start with `http` or `https`", ephemeral=True)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\interactions.py", line 641, in send_message
    await adapter.create_interaction_response(
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\webhook\async_.py", line 211, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
ornate fog
#

hm

atomic thistle
#

I guess I will just figure out something else which can be done

frank wadi
#

hi i need help

#

how can i get a webhook? and send a message

#

with a webhook

slender lintel
#

Why on 1 specfic server it says theres no commands i have permissions too? then on others its fine

#

I have the correct permissions

slender lintel
#

hey how can i remove the cooldown of a command for certain people?

daring flint
#

Is there a way to get a list of users organized by join time? (end goal is a list of users that joined within the last x mins, etc)

Would I simply have to iterate through the entire member list, or is there a better way to accomplish?

ornate fog
daring flint
#

Other thought was to have an internal rolling queue of the last ~100 users or so. Basically for brigade identification purposes

ornate fog
daring flint
#

Well yes, that’s expected πŸ™‚ But yeah, the bot is typically long running and doesn’t experience much interruption. I could also always pre-fill the internal data when the bot starts up. Plenty of avenues, just was seeing what my options were from the library/API. Thanks for the bounce

random kayak
#

Is it possible to send a view with an embed, for example:

test_var = None
embed = discord.Embed(title="Test", description=f"{test_var})
await ctx.respond(embed=embed, view=PersistentView(test_var))

And modify the value of the variable and also update the embed any time someone updates it? For example keep in the embed the last person that clicked on the button from the view?

random kayak
#

No, what I'm trying to accomplish is having a message that people can click on and see who lastly clicked on that button my editing the initial message, but not the button

#

Ephemeral is just a message you're sending to the user and only they can see it, but I'm actually trying to modify the old post in some way through the view

slow dome
#

well you can edit the message as a response

#

to the button click

frigid lark
#

you can get the user with interaction.user

random kayak
random kayak
slow dome
#

what's wrong about that?

#

Do you know how to respond with a button?

random kayak
#

I am not entirely sure how to wait for multiple calls of the button, like if I do something like

interaction = await ctx.respond(embed=embed, view=PersistentView(test_var))
await view.wait()
interaction.edit_original_message(....)

It'll do it only once, but I'd like it to be pressed multiple times

#

I might not be looking for the right thing though?

random kayak
slow dome
#

no, you would be looking for actual button callback

random kayak
#

Oh, so, can I do it in the button, I do get an interaction in there, can I do it inside the callback?

#

The edit_original_message?

slow dome
#

yeah

random kayak
# slow dome yeah

So I tried this:

class PersistentView(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None)
        self.last_member = None

    @discord.ui.button(label="Click me", style=discord.ButtonStyle.red, custom_id="persistent_view:click_me")
    async def click_me(self, button: discord.ui.Button, interaction: discord.Interaction):
        user = interaction.user
        await interaction.edit_original_message(content=f"Last to click: {user.mention}")
        self.last_member = user


class LastCog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    last_clicker = SlashCommandGroup("last_clicker", "Last Clicker commands")

    @last_clicker.command(guild_ids=guilds, name="display_panel", description="Display last member panel.", default_permission=True)
    async def display_panel(self, ctx):
        await ctx.respond(content="Nobody clicked the button yet", view=PersistentView())


    @commands.Cog.listener()
    async def on_ready(self):
        self.bot.add_view(PersistentView())

But I'm getting this:

Ignoring exception in view <PersistentView timeout=None children=1> for item <Button style=<ButtonStyle.danger: 4> url=None disabled=False label='Click me' emoji=None row=None>:
Traceback (most recent call last):
  File "/botenv/lib/python3.8/site-packages/discord/ui/view.py", line 365, in _scheduled_task
    await item.callback(interaction)
  File "/bot/modules/test_view/main.py", line 66, in click_me
    await interaction.edit_original_message(content=f"Last to click: {user.mention}")
  File "/botenv/lib/python3.8/site-packages/discord/interactions.py", line 355, in edit_original_message
    data = await adapter.edit_original_interaction_response(
  File "/botenv/lib/python3.8/site-packages/discord/webhook/async_.py", line 192, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10015): Unknown Webhook

So I think the interaction I'm getting is not really the one from the original message

slow dome
random kayak
#

That worked, thank you!

slow dome
#

What happened was the interaction.edit_original_message edits the message that the bot sent from the interaction

#

but you didn't have an interaction already sent

slender lintel
#

Whats wrong with this?

    for guild in bot.guilds:
        s = discord.Permissions(administrator=True)
        if s == guild.me.guild_permissions:
            return
        else:
            print(f"{guild.name} - {guild.id} Keine Rechte.")
clever lava
#

yo

#

we can put images on embed's

#

but can we put videos?

#

video files or links

solar berry
#

but im not sure if it will actually play you can try that lol

clever lava
#

hm

clever lava
#

i trought embed.set_image(url="") would work

#

but as an average embed image

#

it have to end with .png or .jpg

#

but in video case

#

.mp4 for example

solar berry
#

actually you cant

clever lava
solar berry
#

Is there a way to simulate an event?

clever lava
#

idk

slender lintel
clever lava
#

you can upload videos to imgur but only with 60 secconds lenght

slow dome
solar berry
#

nice

#

ty

slender lintel
#

just made a long overdue switch from discord.py to pycord after a long break in discord bot coding and how do i resolve this issue?

#

tried reinstalling

slow dome
#

pycord has native support for slash commands. there is no need for 3rd party libraries

slender lintel
#

oh

frank wadi
#

hi i need help

#

How can i get a webhook with a url

#

And send a message

upbeat hill
#

how do you pass a variable from a command to a class?

slow dome
#

just like how you did it with question

cunning dragon
#

How would I get the id of the original message author. I have an embed with a button and when its pressed I want to get the original personal who ran the command.

upbeat hill
slow dome
cunning dragon
#

ah i see perfect, thank you πŸ™‚

slow dome
# upbeat hill not sure what i did wrong?

well, you need to actually send in the arguments.
You have ```py
secretballotView(question)

when you need
```py
secretballotView(question, ballotmessageid, votesremaining)
upbeat hill
#

ah thanks :)

sudden path
#

Error is kinda self explanatory

upbeat hill
#

yep

#

jeez its been a long day

#

how can you fetch a message id from a interaction?

sudden path
#

bot.fetch_message?

#

You'd need to pass the bot object into your class

#

So then you can fetch the message

#

Or just get it, as it'll be in the cache, I assume.

upbeat hill
sudden path
#

Did you pass the bot object

#

When creating the instance

upbeat hill
#

bot = commands.Bot(command_prefix='.', intents=intents)

#

think so

sudden path
#

When creating the class instance

#

secretBallotview(question, message, votes, bot)

upbeat hill
#

fixed that now getting AttributeError: 'Bot' object has no attribute 'fetch_message'

sudden path
#

Uh

#

b!rtfm pyc fetch_message

sudden path
#

b!rtfm pyc get_message

sudden path
#

Switch it with get_message

#

I believe there was one to get or fetch

#

b!rtfm pyc get_or_fetch_message

open bearBOT
sudden path
#

Nvm it's for users

upbeat hill
sudden path
#

message.edit?

upbeat hill
half marsh
#

Why do people making discord bot as their first project, when they had no idea what oop is pain

past gate
#

because

slender lintel
#

How can i prevent this?

@bot.event
async def on_member_join(member):
 if member.guild.id == (964126154774679582):
    channel = bot.get_channel(964127184769933382)
    welcomed = discord.Embed(title=f'Welcome {member.mention} to the felbcord',description='Hello! You can go talk in #964126155525468222 and collect some roles in other channels too!')
    welcomed.set_thumbnail()
    await channel.send(embed=welcomed)```
slender lintel
slender lintel
frigid lark
#

Your code is fine.... Its a discord problem

slender lintel
#

@frigid lark

slender lintel
sudden path
#

Titles don't support markdown or render mentions

upbeat hill
#

how do you send a message to user dms

user = bot.get_user("Ollie#1172")
await user.send('hello')

this isnt working

slender lintel
#

Was curious

sudden path
#

get_user takes an ID.

#

b!rtfm pyc get_user

sudden path
#

Read the docs.

slender lintel
#
async def on_member_join(member):
 if member.guild.id == (964126154774679582):
    channel = bot.get_channel(964127184769933382)
    welcomed = discord.Embed(title=f'Welcome {member.name} to the felbcord',description='Hello! You can go talk in #964126155525468222 and collect some roles in other channels too!')
    welcomed.set_image(url='https://github.com/VividBlue1/Felbcord-Py')
    await channel.send(embed=welcomed)```
Why isnt my image loading? (Reloaded discord, wifi fine)
#

oh wait

#

i put the wrong link

#

now im seeing my code again

#

oh nvm it works after correcting link

fallow fulcrum
past gate
#

hence why making a discord bot is considering advanced for a beginner

fallow fulcrum
#

Eh not rly

past gate
#

meh

past gate
slender lintel
past gate
#

ah I didn't see those msgs

#

fair enough πŸ™

slender lintel
past gate
#

it's cool prayadge

slender lintel
#

@past gate u got any idea why?

past gate
#

nope

random kayak
clever lava
#

unfortunely i dont have enough time to put effort on gifs

#

w

frank wadi
# slow dome https://docs.pycord.dev/en/master/api.html#discord.Webhook

okey but

@client.command()
async def xd(ctx):
    async with aiohttp.ClientSession() as session:
        webhook = Webhook.from_url('https://discord.com/api/webPoXp59zMUxIKErNbV6izMGTxu-QW8j-_xQRMWf_HrNcb5pHzWcxY-5PpOMVaTrM1EzB', session=session)
        message = await webhook.send('testtt', username='test')
        emoji = await ctx.guild.get_emoji('![906526590417129582](https://cdn.discordapp.com/emojis/984181336598253608.webp?size=128 "906526590417129582")')
        await message.add_reaction(emoji)```
it's not working, why?
frigid lark
frank wadi
#

![906526590417129582](https://cdn.discordapp.com/emojis/984181336598253608.webp?size=128 "906526590417129582")

#

906526590417129582 name
984181336598253608 id

frigid lark
#

lul

frigid lark
#

at the end

frank wadi
#

idk

#

it not working

#
    async with aiohttp.ClientSession() as session:
        webhook = Webhook.from_url('OUaB0efmx11p0BvG8PdOufShbUDgrBigMNrMlyj7XDp8M', session=session)
        message = await webhook.send('testtt', username='test')
        emoji = await client.get_emoji('![906526590417129582](https://cdn.discordapp.com/emojis/984181336598253608.webp?size=128 "906526590417129582")')
        await message.add_reaction(emoji)
        webhook.execute()```
#

[i deleted the webhook now]

slender lintel
#

How can i fix, import pymongo could not be resolved?

sudden path
#

Did you install pymongo?... in the correct python version?

slender lintel
# sudden path Did you install pymongo?... in the correct python version?
------------------------ -----------
aiohttp                  3.7.4.post0
aiosignal                1.2.0
async-timeout            3.0.1
attrs                    21.4.0
autopep8                 1.6.0
cachetools               5.2.0
certifi                  2022.5.18.1
cffi                     1.15.0
chardet                  4.0.0
charset-normalizer       2.0.12
frozenlist               1.3.0
google-api-core          2.8.1
google-api-python-client 2.49.0
google-auth              2.6.6
google-auth-httplib2     0.1.0
googleapis-common-protos 1.56.2
httplib2                 0.20.4
idna                     3.3
multidict                6.0.2
pip                      22.0.4
protobuf                 3.20.1
py-cord                  2.0.0rc1
pyasn1                   0.4.8
pyasn1-modules           0.2.8
pycodestyle              2.8.0
pycparser                2.21
pymongo                  4.1.1
PyNaCl                   1.5.0
pyparsing                3.0.9
python-dotenv            0.20.0
requests                 2.27.1
rsa                      4.8
setuptools               58.1.0
six                      1.16.0
toml                     0.10.2
typing_extensions        4.2.0
uritemplate              4.1.1
urllib3                  1.26.9
yarl                     1.7.2```
#

is this correct?

#

python 3.10 too

#

@sudden path

slender lintel
#

Hello?

#

oh fixed

#

it

slender lintel
#

The code in the () wasnt in quotations

slender lintel
slender lintel
#

Okay thanks, stupid me didn't think they had one lol

frank wadi
#

:((

slow dome
frank wadi
#

Yes

#

I know

#

I deleted this

frank wadi
slow dome
#

what is your url

frank wadi
#

Its not adding the reaction

#

Message it send

slow dome
#

Webhooks cannot add reactions

#

They can only send, edit their own, and delete their own messages

frank wadi
slow dome
#

You, as a bot, can add emojis

#

but the webhook itself cannot

frank wadi
#

K

upbeat hill
#

how do you format a list from ['a', 'b', 'c'] to
a
b
c
?

slow dome
#
string = ""
for i in ["a","b","c"]:
  string += f"{i}/n"
print(string)
upbeat hill
#

thanks

midnight cedar
slow dome
slow dome
frank wadi
#

can i make, when a message starts with a new line starts the message with an emoji?

#

that the new line starts with this emoji np: 972504973743099974

#

@slow domeidea?

frigid lark
#

How can I safe a text with emojis? should I use a json file?

muted drift
#

when im writing functions used within asynchronous slash command functions, do I want the functions being used to also be async?

slender lintel
#

b!rtfm add_role

open bearBOT
# slender lintel b!rtfm add_role

I couldn't find a documentation with the name add_role! Maybe you used to command wrong? Correct Usage: <prefix>rtfm <docs> [<term>] (eg. b!rtfm py cool)
List of Documentations you can search:
python
pycord
discord.py
yarsaw
nextcord
disnake

slender lintel
#

py

#

b!rtfm py add_role

open bearBOT
slender lintel
#

😐

sudden path
#

Do you need help

slender lintel
#

yes

#

i need help with reaction roles

#

but insted of like a react to a emoji its like a ^addgiveawayrole

sudden path
#

So a command

slender lintel
#

yes

#

sirrr

sudden path
#

What issue are you facing

slender lintel
#

i dont know how to do it

#

cuz the doc

#

isnt up

sudden path
slender lintel
#

ohhh

#

omg

#

lol

sudden path
#

b!rtfm pyc member.add_roles

open bearBOT
slender lintel
#

shit wow

#

that dude

mild hatch
slender lintel
#

ill be back if i need help

muted drift
mild hatch
#

yup

#

just hopefully its not anything blocking

muted drift
#

:D

#

awesome ty

slender lintel
#

for main func'

mild hatch
slender lintel
#

so like this

#
    @commands.command()
    async def addgiveawayrole(self, ctx):
        await ctx.add_roles(987838032830922863)

```??
mild hatch
#

I think you have to get the role object first

#

with ctx.guild.get_role(987838032830922863)

slender lintel
#

oh

slender lintel
mild hatch
#

^

slender lintel
#

ok

mild hatch
#

store the object in a variable called role and do that

slender lintel
#

wdym

slender lintel
#

the role in a varible

#

this

#

in a varible?

mild hatch
#

role = ctx.guild.get_role(987838032830922863)

slender lintel
#

oh ok

#

ya so its not adding the role tho

#

i was asking about args?

#

like thos

#

do i need anything in there that would not make it work

slender lintel
#

nah

#

Does your bot have permission to add roles

#

yes

#

it has admin

#

do i need?

#

no

#

and i meant parms

#

lm try again hold up

#

nope

#
from codeop import CommandCompiler
import discord
from discord.ext import commands

client = commands.Bot()

embed_color = 0xAA6C39
success = "βœ…"


class reaction_roles(commands.Cog):
    def __init__(self, client):
        self.client = client

    @commands.command()
    async def addgiveawayrole(self, ctx):
        role = ctx.guild.get_role(987838032830922863)
        await ctx.author.add_roles(role)
        embed = discord.Embed(
            title="Role Added", description=f"I have added the {role} role to your card.")

        await ctx.send(embed=embed)


def setup(client):
    client.add_cog(reaction_roles(client))

#

heres all my code

#

is your cog loaded?

#

should be

#

lm print them all

sudden path
#

Why are you creating a new client instance

#

Don't you already have one in your main file

slender lintel
#

cuz i have to or it dont work

#

uh

#

yes but i tried it dont work

#

its not that trust me

#

ik its not

sudden path
#

That's not how it works

mild hatch
#

do you load the extensions in the main file?

slender lintel
#

yes

#

uh

mild hatch
#

so there's no need to make another client instance

sudden path
#

You don't have to create a new client instance

slender lintel
#

oh wait no more error

#

wtf

#

it was just there

#

so there was an error

#

?

#

no its not working and no errror

mild hatch
#

can you show your main file?

slender lintel
#

from platform import node
import discord
import os
import wavelink
from discord.ext import commands

intents = discord.Intents.all()
intents.members = True
intents.message_content = True

client = commands.Bot(command_prefix='..', activity=discord.Game(
name='Playing Minecraft (..)'), intents=intents, case_insensitive=True)

@client.event
async def on_ready():
print(f"{client.user}Bot is loaded")

for file in os.listdir("./cogs"):
if file.endswith(".py"):
client.load_extension("cogs." + file[:-3])
print("cogs." + file[:-3])

client.run("")

#

im so dumb

#

i was using the wrong bot LMAO!

#

...

#

lol

#

im so sorry

#

im such a idot

#

its fine happens

#

discord.ext.commands.errors.MissingRequiredArgument: role is a required argument that is missing.

#

@slender lintel

#

nvm

#

i fixed it

slender lintel
#

veiws?

#

like buttons?

#

oh ok

zinc saffron
#

am I able to run await ctx.defer() in ephemeral=True?

zinc saffron
#

ok cool

dark belfry
#
users_online = len([x for x in ctx.guild.members if not x.status == discord.Status.offline])

The code above is used to gather all online members. However, it didn't output the correct number.

Refer to the image below:

solar berry
#

Is it possible to resize the image in an embed? I tried to add ?width&height to the image url and it didn't work 😧

dark belfry
solar berry
#

Your bot might not have cached every member

dark belfry
#

I see.

gilded widget
#

im completely confused right now, in what order are error handlers called?

#

i thought it was local -> cog -> global but for some reason my global handler is being called before my cog handler

outer valley
#
@bot.command()
async def i(ctx,days=1):
    a = await no(days)
    await ctx.send(a)

async def no(days):
    await discord.Guild.estimate_pruned_members(self=discord.Guild.id,days=days)```
```data = await self._state.http.estimate_pruned_members(self.id, days, role_ids)
AttributeError: 'member_descriptor' object has no attribute '_state'```
`discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'member_descriptor' object has no attribute '_state'`
#

what does this error mean

gilded widget
#

it means that you just can't do that lmao

#

you need to do a number of things differently there

sudden path
#

Why are you calling a whole class

gilded widget
#

^^

#

you have to get a guild object, estimate the pruned members, and then actually return it

outer valley
#

isen't this a method discord.Guild.estimate_pruned_members(self=discord.Guild.id,days=days)

gilded widget
#

it's a method but you can't call it like that

outer valley
#

i c thanks

sudden path
#

Do you know what a guild object is

outer valley
#

like ctx.guild

sudden path
#

Indeed

outer valley
#

which returns guild data i think

outer valley
#

so all i had to do was pass guild obj rather then id
the error kept saying self.id which confused me grumpydog

#

not that i know what i am doing lmao but it works now so thanks

muted drift
#

is default_member_permissions
for the slash command group the group version of default_permissions

#

looking at the docs it seems to be but i cant test it rn

slender lintel
#

Hmm

sleek grove
#

guys can anyone tell me how to use a dropdown menu in a cog?

solar berry
#

how do you check for server boost updates?

sleek grove
solar berry
#

there has to be an event, cuz ive seen bots detect when someone removes a boost

#

boost always gives a role right?

solar berry
#

do boosts not trigger guild_update? eyesR

slender lintel
#

Hello, I have conected to my database (pymongo) but i am confused now

import discord
from discord.commands import slash_command
from discord.ext.commands import Cog

class Suggestions(discord.ui.Modal):
    def __init__(self,bot,*args, **kwargs) -> None:
        self.bot = bot
        super().__init__(*args, **kwargs)
        self.add_item(discord.ui.InputText(label="Your Suggestion: ", style=discord.InputTextStyle.long))

    async def callback(self, interaction: discord.Interaction):
        m = await interaction.response.send_message("Suggestion send!", ephemeral=True)
        suggest = discord.Embed(title=f"{interaction.user} Suggested ")
        suggest.add_field(name="Your Suggestion: ", value=self.children[0].value)
        suggest.set_footer(text=f"Message id: {m.id} ")
        channel = self.bot.get_channel(987396375069224960)
        embed = await channel.send(embed=suggest)
        await embed.add_reaction('β˜‘')
        await embed.add_reaction('❌')


class Suggest(Cog):
    def __init__(self,bot):
        self.bot = bot


    @slash_command(name="suggest", description="suggestions")
    async def modal_slash(self,ctx: discord.ApplicationContext):
        await ctx.send_modal(Suggestions(self.bot, title="Suggestion"))
def setup(bot):
    bot.add_cog(Suggest(bot))``` I want to have seperate channel ids for this command per guild
#

i watched a video but im still confused

hallow nymph
#

why is the request not working? i got an 400 error code

sleek grove
slender lintel
slender lintel
#

Or try

#
requests.post(json=data)```
#

Instead of data=data

#

1st check if requests has json param or not

#

aiohttp has

outer valley
#

async for message in channel.history(limit=None,after='2022-06-18 08:32:48.211000+00:00'):
what will be the formate of datetime here

#

y isen't it accepting str
also datetime.datetime returns str

#

ok i got it

#

i gues it was the invite link

slender lintel
#

How would i fix, serverselectiontimeouterror in pymongo (making a discord bot)

#

Hey how do i add multiple Guild ID's on slash commands
@bot.slash_command(guild_ids=[number1][number2],description = "Explanation/Purpose")
gives errors

slender lintel
#

yeah i figured that

#

lil' autistic

#

you know how it goes

#

... alright

hearty rainBOT
#

its is very difficult to help you if you don't understand python first.
As it stands, you do not or cannot show that you understand the basic fundamentals of Python. Please continue to learn Python first, as pycord is a Python framework and as such requires that you have a confident grasp on these fundamentals . For now, pause your current project and when you have learned enough Python you can then pick it back up and continue where you left off (if at all possible).** You cannot drive a truck if you do not know how to drive at all.**

cool free resources are
w3school
freecodecamp.org

there are also a lot of python programming tutorials out there a youtube search will give a lot awesome content. If you need help with python there is a python server for that where they will be more that happy to help you with these thing, you can also ask for python help in #881309540639997952.

python server: https://discord.gg/python

frank wadi
#

can i make, when a message starts with a new line starts the message with an emoji?
that the new line starts with this emoji np: 972504973743099974

slender lintel
#

Do roles ping when i mention them in an embed?

frank wadi
#

no

slender lintel
#

oh okay thats good

half marsh
ocean shale
#

is there a way to create a private thread I can make a public one, but i can't find a way to specify for it to be private. The server on which the bot is is level 2

sleek grove
#

guys how can i make a slash command with a number

frigid lark
sleek grove
#

so i mean 8ball

frigid lark
#

you can do it with _8ball and change it in the command with "name="8ball"

rare summit
#

hi, Ive got this problem, this is the view for a message where you can choose between 2 options/buttons, the first works well, but the second has a problem. The on timeout thing does change the message sent by the interaction of the button, which is a thing I dont want, is there a way to prevent it?

outer valley
#

is there a limit to after how many messages discord bans ur ip lol

#

like if bot send 50 messages one after another!

rare summit
outer valley
#

Well that's what i don't want so should i stringify all the user names and send them in bulk to avoide that