#discord-bots

1 messages ยท Page 1011 of 1

slate swan
#

they mean the eval command

paper sluice
regal pulsar
silk rock
regal pulsar
#

lmao

slate swan
#

@slate swan โœ… Your eval job has completed with return code 0.

SCAM
regal pulsar
#

!e print("Never gonna give you up")

unkempt canyonBOT
#

@regal pulsar :white_check_mark: Your eval job has completed with return code 0.

Never gonna give you up
slate swan
#

you just need to install this library, py bot.load_extension('jishaku') and .jsk py is your eval command

limber stratus
#

It's my 2nd day using Discord, so no.

slate swan
#

you can perform discord.py related operations with that command itself _ctx will be in the scope

regal pulsar
#

lol

#

what if i did

silk rock
#

!e

print("hello world")
unkempt canyonBOT
#

@silk rock :white_check_mark: Your eval job has completed with return code 0.

hello world
unkempt canyonBOT
#

@supple thorn :white_check_mark: Your eval job has completed with return code 0.

21
slate swan
#

You can go into #bot-commands if you test random stuff that doesn't help answer someone's question.

supple thorn
slate swan
#

how to use that eval, simply .jsk py <code>

limber stratus
#

What Bot permissions should I check or leave it as it is?

regal pulsar
#

you dont need any to access the members list

silk rock
#

man i have no idea

slate swan
#

you just do .jsk py <code> on discord

#

. being your prefix here*

silk rock
slate swan
#

back

limber stratus
silk rock
#

ok now i get it

silk rock
regal pulsar
#

go to the code

#

where it says bot.run("token")

#

change "token" to your token

#

then go to the developer page

slate swan
regal pulsar
#

bot > url generator > copy the link

limber stratus
regal pulsar
#

mb

limber stratus
regal pulsar
limber stratus
# regal pulsar none

It's showing 'Please select at least one OAuth2 scope' in the Generated URL text box

regal pulsar
#

doesnt really matter

limber stratus
slate swan
#

ye

#

send ss where are u

regal pulsar
#

i forgot

#

choose bot then dont choose anything after

slate swan
regal pulsar
#

oops ;/

slate swan
#

oops

limber stratus
slate swan
#

object oriented programming sus

regal pulsar
#

then click on it

#

and invite the bot to your server

#

and run your code

slate swan
#

ok

#

thanks for the info

regal pulsar
#

this is giving me raid bot vibes

regal pulsar
slate swan
regal pulsar
#

not sure

#

try alt f4

slate swan
#

ok

slate swan
regal pulsar
limber stratus
slate swan
#

what

slate swan
limber stratus
regal pulsar
lyric apex
#

Anyone know, like if user uses a commmand and delete the command usage then the message of bot also get deleted is it possible?

lyric apex
#

How

slate swan
#

help him emotional support

#

๐Ÿ‘€

lyric apex
#

What happenedyert @regal pulsar

regal pulsar
#

one sec

lyric apex
#

K

regal pulsar
#

doing it

#

im trying it with bot.wait_for

lyric apex
slate swan
slate swan
#

๐Ÿ‘€

#

rly?

#

ded chat

limber stratus
slate swan
#

u dont have any server

#

to invite the bot

#

are u coding on notepad?

limber stratus
regal pulsar
#

@bot.command()
async def test(ctx: commands.Context):
    bot_msg = await ctx.channel.send("Test")

    def check(message):
        return message.author == ctx.author and message.content == f"{bot.command_prefix}test"

    msg = await bot.wait_for("message_delete", check=check)
    if msg:
        bot_msg.delete()
#

@lyric apex

slate swan
regal pulsar
#

try this

regal pulsar
limber stratus
torn sail
#

You need manage server perms to invite a bot

regal pulsar
#
@bot.command()
async def test(ctx: commands.Context):
    bot_msg = await ctx.channel.send("Test")

    def check(message):
        return message.author == ctx.author and any(message.content == f"{bot.command_prefix}{cmd}" for cmd in bot.commands)

    msg = await bot.wait_for("message_delete", check=check)
    if msg:
        bot_msg.delete()

jade tartan
limber stratus
jade tartan
#

might just wait till tomorrow then

torn sail
#

Or make ur own server

regal pulsar
#

isnt really much to do with styling embeds but you can use inline=False

#

no thats fine

cloud dawn
#

You are adding it to the string

#

It's a kwarg

#

!arg-kwarg

unkempt canyonBOT
#

*args and **kwargs

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

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

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

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

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

cloud dawn
#

No you need to seperate it from the string like you did with value=''

#

You need to separate those.

torn sail
#

value='', inline=False

cloud dawn
#

!d discord.Embed.add_field

unkempt canyonBOT
#

add_field(*, name, value, inline=True)```
Adds a field to the embed object.

This function returns the class instance to allow for fluent-style
chaining. Can only be up to 25 fields.
cloud dawn
#

No you still have it inside the string.

#

No

#

The first field is correct.

#

๐Ÿ‘

slate swan
#

does thread.owner returns the one who created it or ?

cloud dawn
#

Comment somewhere at the start.

cloud dawn
maiden fable
#

!d discord.Thread.owner

unkempt canyonBOT
maiden fable
#

Ah well yea

cloud dawn
#

owner_id should always be consistent.

maiden fable
#

Yea, since u can not depend on the cache always

cloud dawn
slate swan
maiden fable
#

Yea

slate swan
#

it returns the one who created the thread but

#

wanna do a cmmand like where a user uses a?setup logchn #general and then the bot stores it in a file

after that any command used in that particular server should have a logging in the channel set for that particular server

cloud dawn
#

Do you got some code we can look at?

#

Did you restart the bot?

slate swan
#

nvm

cloud dawn
#

Don't think you have since this code doesn't align with what you've got.

slate swan
cloud dawn
#

User has DM disabled.

limber stratus
#

Can we scrape members of a Discord Server using Selenium?

cloud dawn
limber stratus
cloud dawn
#

No thanks.

cloud dawn
#

Discord doesn't allow it.

limber stratus
#

Okay, but it's something I am asked to do by my boss and I really need get it done by tomorrow. I am very confused right now. Nothing's working.๐Ÿ˜ซ

cloud dawn
limber stratus
cloud dawn
gaunt ice
#

yea

#

like imagine a server with 1k members

#

it takes so much time

cloud dawn
limber stratus
pliant gulch
#

Why even scrape, just use the official API

pliant gulch
limber stratus
cloud dawn
pliant gulch
#

Scraping would only be useful for self bots

gaunt ice
#

for scraping the users if a unknown server the bot must be in the server

cloud dawn
small sentinel
#

is get_user the same object type as ctx.author please ?

cloud dawn
#

!d discord.User

unkempt canyonBOT
#

class discord.User```
Represents a Discord user...
cloud dawn
#

!d discord.Member

maiden fable
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")...
placid skiff
#

get_user is not an object D_D

placid skiff
#

it returns an user object

limber stratus
placid skiff
#

but get_user is a method D_D

cloud dawn
placid skiff
gaunt ice
#

umm

slate swan
#
@client.event
async def on_message(message):
    if "lol" in message.content.lower():
        await message.delete()

@client.event
async def on_message(message):
    if "haha" in message.content.lower():
        await message.delete()

How to run both, because it's only using "haha", it covers "lol".
I wanna run both, but idk how ) If you know how, please help me!

cloud dawn
unkempt canyonBOT
#

@cloud dawn :white_check_mark: Your eval job has completed with return code 0.

['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit', 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']
maiden fable
#

uh

gaunt ice
#

Lucas?

maiden fable
#

yes

#

@slate swan its not that complicated

gaunt ice
#

did u watch tuto for unban cmd

maiden fable
#

just do await ctx.guild.unban(discord.Object(id_here))

placid skiff
unkempt canyonBOT
#

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

<method 'split' of 'str' objects>
gaunt ice
#

member id.....

maiden fable
#

the ID of the person to unban

#

isn't that what u wanna do?

limber stratus
slate swan
#
@client.event
async def on_message(message):
    if "lol" in message.content.lower():
        await message.delete()

@client.event
async def on_message(message):
    if "haha" in message.content.lower():
        await message.delete()

How to run both, because it's only using "haha", it covers "lol".
I wanna run both, but idk how ) If you know how, please help me!

slate swan
gaunt ice
#

why do u have to delete haha.....

slate swan
slate swan
gaunt ice
slate swan
#

I don't wanna send this word here

placid skiff
slate swan
placid skiff
#

it will be resolved only one event

slate swan
gaunt ice
#

elif

slate swan
#

ok

limber stratus
cloud dawn
gaunt ice
#

that too

#

if any(word in list for word in message.content):

slate swan
cloud dawn
placid skiff
#

in cogs you don't use events

#

you use listeners

#

which are essentially the same thing but multiple listeners can be resolved at the same time

slate swan
#

Yea that's what I meant haha

slate swan
#

Oh!

pliant gulch
cloud dawn
pliant gulch
#

Never said they werenโ€™t using a bot account

#

Plus pretty sure you need permissions to that endpoint

cloud dawn
pliant gulch
# cloud dawn Come on man, seriously?

They said originally they wanted to use a library which they 100% had to selfbot. for the API this isnโ€™t the case, I would assume they would switch to the proper bot account when using the API

pliant gulch
#

Plus you still need proper authentication for that endpoint iirc

cloud dawn
#

Never made a self bot so idk tbh.

pliant gulch
#

It requires intents, which are only available for bot accounts

#

You canโ€™t selfbot with intents otherwise it breaks

#

So you cannot selfbot this endpoint ๐Ÿ˜€

tacit token
#

slash good with v10 python? - dc.py (i dont change it)

#

yeah with sqlite3

slate swan
#

How can i get the one who sent the message?

#

is this possible

      do stuff```
slate swan
#

Any idea?FortniteDude

slate swan
slate swan
slate swan
slate swan
#

which event?

#
@bot.event
async def on_guild_join(guild):```
#

k ty

tidal hawk
#

Can a bot find message from guild with disnake.utils

slate swan
slate swan
boreal ravine
slate swan
slate swan
tidal hawk
#

What's the best way to get a message object, if I have 5 channels where it might be

slate swan
#

ig he mean pass the ctx ?

slate swan
slate swan
#

ill give example

tidal hawk
slate swan
#

everyone look:

@client.event
async def on_message(message):
    if any(word in message.content for word in ["haha", "lol"]):
        await message.delete()

where can I write message.content.lower()

#

I need it

boreal ravine
# slate swan An example ๐ŸŒ
class MyView(View):
    def __init__(self, message):
        super().__init__()
        self.message = message

view = MyView(message)

should learn about classes before using d.py

cloud dawn
slate swan
#
class but(discord.ui.View):
 def __init__(self,c):
   self.c = c
@bot.command()
async def s(ctx):
   but(ctx)
tidal hawk
slate swan
#

wait

cloud dawn
unkempt canyonBOT
#

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

Retrieves a single [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message") from the destination.
slate swan
sick birch
tidal hawk
cloud dawn
#

Since it's a User object.

boreal ravine
tidal hawk
#

Tried member.fetch_message earlier and it gave me error: User has DM's disabled

slate swan
tidal hawk
slate swan
#

Ight thank yall

#

How to get guild name?

#

k

slate swan
#

im

formal basin
#

What does this error mean

slate swan
#

i suggest copy paste error in chat

formal basin
boreal ravine
cloud dawn
#

They can you just need to make a group.

#

Not exactly the name but he could use that.

#

You get my point @boreal ravine

boreal ravine
#

yeah

slate swan
#

hello

#

hi

#

i need help

#

sure what do u need help with?

paper sluice
#

u didnt send the view

slate swan
#

actly i hav ethis bot I've made and i've made a command to show to user's profile (stats, lvl, etc) and idk why the ctx commads are correct but not responding

paper sluice
#

ya

slate swan
paper sluice
#

where u want the selectview....

slate swan
# slate swan actly i hav ethis bot I've made and i've made a command to show to user's profil...

this is the command:

  pfp = pfp.resize(size, Image.ANTIALIAS).convert("RGBA")
  bigsize = (pfp.size[0] * 3, pfp.size[1] * 3)
  mask = Image.new('L', bigsize, 0)
  draw = ImageDraw.Draw(mask) 
  draw.ellipse((0, 0) + bigsize, fill=255)
  mask = mask.resize(pfp.size, Image.ANTIALIAS)
  mask = ImageChops.darker(mask, pfp.split()[-1])
  pfp.putalpha(mask)
  return pfp

@bot.command(name="profile")#!profile command
async def profile(ctx, self, member:discord.Member=None):
  if not member:
    member = ctx.author()

  name, nick, Id, status = str(member), member.display_name, str(member.id), str(member.status).upper()
  created_at = member.created_at_strftime("%a %b \%B %Y")
  joined_at = member.joined_at.strftime("%a %b \%B %Y")
  #money, leave = " ", " "
  
  base = Image.open("base.png").convert("RGBA")
  bg = Image.open("drippydefault_background.png").convert("RGBA")
  pfp = member.avatar_ulr_as(size = 256)
  data = BytesIO(await pfp.read())
  pfp = Image.open(data).convert("RGBA")

  name = f"{name[:16]}" if len(name)>16 else name
  nickname = f"AKA {nick[:17]}" if len(nick)>17 else f"AKA - {nick}"

  draw = ImageDraw.draw(base)
  pfp = circle(pfp, size=(215, 215))
  font = ImageFont.truetype("Nunito-VariableFont_wght.ttf", 38)
  akafont = ("Nunito-VariableFont_wght.ttf", 30)
  subfont = ("Nunito-VariableFont_wght.ttf", 25)
  
  draw.text((280, 240), name, font = font)
  draw.text((270, 315), nickname, font = akafont)
  draw.text((65, 490), Id, font = subfont)
  draw.text((405, 490), status, font = subfont)
  #draw.text((65, 635), money, font = subfont)
  #draw.text((405, 635), level, font = subfont)
  draw.text((65, 770), created_at, font = subfont)
  draw.text((405, 770), joined_at, font = subfont)
  base.paste(pfp, (56, 158), pfp)
  bg.paste(base, (0,0), base)

  with BytesIO() as a:
    bg.save("a", "PNG")
    a.seek(0)
    await ctx.send(file = discord.File(a, "profile.png"))
last moss
#

!paste

unkempt canyonBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

slate swan
#

I wanna do like
if ctx.guild.id in filename.txt: do stuff
Will this code work?

tacit token
#

Hello guys, this slash why not work?

from discord import Client, Intents, Embed
from discord_slash import SlashCommand, SlashContext
from discord.ext import commands

bot = commands.Bot(command_prefix=("f"),intents=Intents.default())
slash = SlashCommand(bot)

@slash.slash(name="test")
async def test(ctx: SlashContext):
    embed = Embed(title="Embed Test")
    await ctx.send(embed=embed)
#

dpy | python v10

paper sluice
#

then send it with the help command ๐Ÿคทโ€โ™‚๏ธ

#

just like this...

#

๐Ÿคฆ

#

like ctx.respond(embed=embed, view=SelectView())

tacit token
paper sluice
#

and dont name it ctx, its not a command.Context a more appropriate name would be interaction

tacit token
#

but i need slash (dc dm me for use slash to my bot because my bot verified)

formal basin
#

I was making a slash command but I got an error. Please help me

tacit token
sick birch
limber stratus
#

Does anyone know how to scroll down the members on the right side using Selenium?

sick birch
#

Instead of some random 3rd party library

sick birch
tacit token
sick birch
tacit token
maiden fable
#

Someone is on the Events Team ๐Ÿ‘€

tacit token
#

but i re-invite the bot and etc

sick birch
boreal ravine
sick birch
#

I like green more than yellow

maiden fable
sick birch
#

you got it boss

maiden fable
#

Ah hahaha

formal basin
limber stratus
sick birch
#

And the current time is the same time someone used a slash command

sick birch
formal basin
#

I want to know when the user created there discord account

tacit token
formal basin
sick birch
#

interaction.user.created_at iirc

boreal ravine
formal basin
#

interaction.user.created_at

boreal ravine
#

the error got raised because of ctx.message

cloud dawn
sick birch
formal basin
sick birch
#

I got a few slash commands working with d.py no problemo

cloud dawn
somber heath
#

I am making a Dragon Ball themed bot and want to make a command that randomly gives you a Dragon Ball, and when you collect all 7, you can get a surprise (like a gif). Will I need to use random?
I meant that when the user uses the command (example .dragonradar) and gets, let's say, a One-star Dragon Ball, the bot saves that the user got a ball, and when the user uses another command (example .shenron) but has only one ball, the bot says "You don't have the right amount of Dragon Balls, find them with .dragonradar!", and when the user gets all 7, and uses the shenron command again, he gets a gif.
I am using discord.py

My question: What should I do (steps)?

sick birch
formal basin
#

Ohhhh

#

I never saw

maiden fable
#

is it a slash command?

sick birch
formal basin
maiden fable
#

await interaction.original_message()

cloud dawn
boreal ravine
maiden fable
#

better is to use datetime.utcnow

#

Wait, I thought he was using 2.0

#

My bad sorry

formal basin
#

Or could I do datetime.now?

#

Instead of utc

velvet tinsel
#

Bruh

somber heath
formal basin
#

Instead of utc

limber stratus
#

How can I scroll down only the right side of stocks list using selenium?

maiden fable
#

mhm

limber stratus
maiden fable
#

Read it

formal basin
#

Where do I put it

maiden fable
#

?

formal basin
cloud dawn
formal basin
cloud dawn
#

!pypi slash

unkempt canyonBOT
cloud dawn
#

hmm

pseudo portal
formal basin
maiden fable
#

bro

somber heath
maiden fable
#

datetime.datetime.now() after importing datetime

somber heath
#

Oh

small sentinel
#

Is there any way for a bot to execute discord commands ?

formal basin
#

Oh

somber heath
#

xd

maiden fable
#

No dude

#

remove the ctx. smh

pseudo portal
formal basin
somber heath
formal basin
#

Is it from discord import datetime

torpid grail
#

!pypi tts

unkempt canyonBOT
slate swan
#

question is there anyway that client.event can see messages? like if someone says a cprofanity word it will delete it

maiden fable
formal basin
maiden fable
#

show code

formal basin
#

So ctx

#

Ok

#

โ€œโ€˜@slash.slash(name="whois", description="to see information on that person")
async def whois(ctx, user: discord.Member = None):

if user == None:
    user = ctx.author

rlist = []
for role in user.roles:
    if role.name != "[censored because of auto mod in server]":
        rlist.append(role.mention)

b = ", ".join(rlist)

embed = discord.Embed(colour=user.color, timestamp=message.datetime.now())

embed.set_author(name=f"User Info - {user}"),
embed.set_thumbnail(url=user.avatar_url),
embed.set_footer(text=f'Requested by - {ctx.author}',
                 icon_url=ctx.author.avatar_url)

embed.add_field(name='ID:', value=user.id, inline=False)
embed.add_field(name='Name:', value=user.display_name, inline=False)

embed.add_field(name='Created at:', value=user.created_at, inline=False)
embed.add_field(name='Joined at:', value=user.joined_at, inline=False)

embed.add_field(name='Bot?', value=user.bot, inline=False)

embed.add_field(name=f'Roles:({len(rlist)})',
                value=''.join([b]),
                inline=False)
embed.add_field(name='Top Role:',
                value=user.top_role.mention,
                inline=False)

await ctx.send(embed=embed)โ€โ€™
slate swan
slate swan
#

how does python read files? does it go lines by line or something else

slate swan
slate swan
maiden fable
formal basin
maiden fable
#

Ah cool

slate swan
#

I got McDonaldโ€™s icecream

hard trail
#

So I want it to log my bans however when I ban it doesn't put embed2 into my log channel. What's wrong? No errors

@bot.command()
async def ban(ctx, user: nextcord.Member, *, reason=None):
  guild = ctx.guild
  if reason == None:
    reason == "Not Specified"
  embed1 = nextcord.Embed(title="User Successfully Banned!", description = f"**{user}** has been banned!")
  embed2 = nextcord.Embed(title=f"Ban Information on {user}!", color = nextcord.Color.red())
  embed2.add_field(name="User", value = f"{user.mention}")
  embed2.add_field(name="Admin/Moderator", value = f"{ctx.author.mention}")
  embed2.add_field(name="Reason", value = f"**{reason}**")
  embed2.set_footer(text=f"User ID: {user.id}")
  embed3 = nextcord.Embed(title=f"Your Ban from {guild}", description = f"You were banned from {guild} because **{reason}**", color = nextcord.Color.red())
  if user.guild_permissions.manage_messages:
    error1 = nextcord.Embed(title='User is an Admin/Moderator!', color=nextcord.Color.red())
    await ctx.send(embed=error1)
    return
  else:
    if ctx.author.guild_permissions.ban_members:
      await guild.ban(user=user)
      await ctx.send(embed=embed1)
      await user.send(embed=embed3)
      log_channel = bot.get_channel(879095317771997246)
      await log_channel.send(embed=embed2)
light violet
#

What to do now

slate swan
#

Itโ€™s a key error

light violet
#

Btw everything is correct

#

I used it

cloud dawn
light violet
#

I tried it without str too

pseudo portal
slate swan
#

json.loads(response.text) returns the dict correctly

light violet
#

Geo =Json.loads(r.text)?

slate swan
#

Yes

light violet
#

Ok lemme try

pseudo portal
#

whats doin all this? ๐Ÿ˜…

slate swan
#

No module found named discord.interactions!!!

#

Do you mean discord-interactions?

cloud dawn
#

!d discord.Interaction

unkempt canyonBOT
#

class discord.Interaction```
Represents a Discord interaction.

An interaction happens when a user does an action that needs to be notified. Current examples are slash commands and components.

New in version 2.0.
slate swan
#

Thatโ€™s the problem then lol

#

Misspelling

pseudo portal
#

im confused, cus its not even in the files im editing lol ๐Ÿ˜… howd i like redownload pip installations or check theyre all good?

#

or is that not even the issue ๐Ÿ˜„

slate swan
#

discord.Interaction

#

๐Ÿ‘€

pseudo portal
#

wdym ๐Ÿ˜… srry for my stupidity but im pretty new ๐Ÿ˜„

slate swan
#

Remove that โ€˜sโ€™

pseudo portal
#

now its without the s

slate swan
#

Also capital I

#

Idk if itโ€™s case sensitive, Iโ€™m going off of what the panda dude said

pseudo portal
slate swan
#

It's from discord import Interaction

#

Not from discord.interaction import Interaction

#

Bruh Iโ€™m dumb af ๐Ÿ’€

pseudo portal
#
Traceback (most recent call last):
  File "c:\Users\cohen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\bridge\bot.py", line 27, in <module>
    from discord import Interaction
ImportError: cannot import name 'Interaction' from 'discord' (C:\Users\cohen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\__init__.py)
PS C:\Users\cohen\Desktop\Files\Night Wolf\Discord Bots> ```
#

idek lol

slate swan
pseudo portal
#

1.7.3

slate swan
#

Update to 2.0

#
pip install discord.py @ git+https://github.com/Rapptz/discord.py
pseudo portal
pseudo portal
slate swan
#

Oh yeah it's pip install git+https://github.com/Rapptz/discord.py

#

And no need of PowerShell for that

#

Can do in simple cmd

pseudo portal
#

its running, ty ๐Ÿ˜‰

pseudo portal
slate swan
pseudo portal
#

yep

slate swan
#

Nah

pseudo portal
#

daang u been coding a lot

slate swan
#

It's powershell

pseudo portal
slate swan
#

You just start PowerShell when you create a new 'terminal' view on VSC

pseudo portal
#

installed!

slate swan
#
PS C:\....

PS = PowerShell

pseudo portal
#

uh oh, i messed up didnt i ๐Ÿ˜…

slate swan
#

Never said the opposite

#

Then why are you arguing about it?

#

Because you keep on saying it's not, which is wrong

#

ยฏ_(ใƒ„)_/ยฏ

#

I said it was the visual studio code terminal, if he opened windows power shell Normally that would be a bit weird but it made sense to use the terminal in his environment

#

What is even discord.ext.bridge

pseudo portal
slate swan
#

Doesn't exist in the the documentation either

slate swan
unkempt canyonBOT
#
Not likely.

No documentation found for the requested symbol.

slate swan
#

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

slate swan
#

Why you've used that?

pseudo portal
#

idek what ive done anymore lmao

slate swan
#

What were you using before for a library?

#

hi

slate swan
slate swan
#

Then you got to remove that and migrate to 2.0

#

So you might want to take a look at what's the alternative to what you've done with bridge

pseudo portal
# slate swan What were you using before for a library?

wdym? i have two docs, ones my main code, i did it terribly using discord.py and couple of addons and did comands with if message.content etc. so i created a new doc and used pycord bridged and started moving the code there... and ive messed up along the way and just getting loads of errors and idek what to do lol

slate swan
#

You need to remove the bridge import, that's for sure

#

Then I'd uninstall pycord along with discord.py 1.7.3 as you probably have them installed

pseudo portal
slate swan
#

hybrid commands

pseudo portal
#

oh no, im clueless with that ๐Ÿ˜… tried that and failed

slate swan
#

how to tag a person?

#

I forgot

#

!d discord.User.mention

unkempt canyonBOT
slate swan
#

thx

slate swan
slate swan
slate swan
slate swan
#

Doesn't matter

#

It just says that you canโ€™t go to it anyway

pseudo portal
slate swan
#

It's just that you're not in the server

#

Fuck man idfk

daring olive
slate swan
#

Yeah

daring olive
slate swan
#

Last time I sent an invite I got bonked by AutoMod sadge

maiden fable
slate swan
#

Yeah which we don't know

maiden fable
slate swan
#

it's rustlang

maiden fable
#

Oh wait

slate swan
maiden fable
#

@unkempt canyon ๐Ÿ‘€

slate swan
#

Good to know /rust is allowed

maiden fable
#

Lmaoo

slate swan
#

https://discord.com/invite/rust-lang-community

#

That name though

#

Who is it supposed to mention?

#

^^

maiden fable
#

U didn't define the member variable

slate swan
#

You haven't defined member

slate swan
slate swan
slate swan
velvet tinsel
#

show the function there's gotta be member in the arguments somewhere

slate swan
#

So show the entire command code now

#

So that we have more context to help ^^

#

have u even passed the member arguement in the func

velvet tinsel
#

something like async def function_name(ctx, member: discord.Member) no

slate swan
# slate swan So show the entire command code now
bot.command()
async def gay(ctx):
    embed = discord.Embed(title=":rainbow_flag:Gay metr:rainbow_flag:", description=f"{member.mention} is **{random.randrange(101)}%** Gay", color = discord.Color.light_grey())```
#

Yeah something like that is needed

#

See the message above :D

velvet tinsel
slate swan
#

You need to pass your command parameters

#

u can't mention users in embed btw

velvet tinsel
#

it also needs to have discord.Member object

slate swan
velvet tinsel
#

member: discord.Member

slate swan
#

u can't

#

Just not in the title and field names

velvet tinsel
slate swan
#

thx

#

You literally can...

#

It just won't ping

velvet tinsel
#

ive been mentioned in embeds before

slate swan
#

But you can mention

velvet tinsel
#

wait

slate swan
velvet tinsel
#

thats not mentioned i was mentioned in the text field outside the embed

velvet tinsel
slate swan
#

Because that's me

echo wasp
#

how would i build a warning system?

slate swan
#

๐Ÿคท

velvet tinsel
slate swan
velvet tinsel
#

oh

echo wasp
slate swan
velvet tinsel
#

fuck im stupid lmfao i looked at your website but then thought "wait it probably doesn't have .ninja as a domain"

slate swan
#

Changed domain yeah

velvet tinsel
slate swan
velvet tinsel
#

what do you need help with specifically

velvet tinsel
#

your question is vague you asking for the whole code or

echo wasp
velvet tinsel
echo wasp
tacit token
#

how can i set permission to slash? (i create ban slash)

velvet tinsel
slate swan
#

where error?

#
# gay metr
bot.command()
async def gay(ctx, member: discord.Member):
    embed = discord.Embed(title=":rainbow_flag: Gay metr :rainbow_flag:", description=f"{member.mention} is {random.randrange(101)}% Gay", color = discord.Color.light_grey())
    await ctx.send(embed=embed)
velvet tinsel
#

ive never fucked with slash commands but im pretty sure the command.has_permission(manage_members=True) works for slashes

slate swan
#

!d discord.ext.commands.has_permissions

unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of
the permissions necessary.

Note that this check operates on the current channel permissions, not the
guild wide permissions.

The permissions passed in must be exactly like the properties shown under
[`discord.Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions")...
velvet tinsel
velvet tinsel
slate swan
slate swan
velvet tinsel
velvet tinsel
#

i thought it was just command

slate swan
#

oh, thx

slate swan
velvet tinsel
frozen patio
#

Wow ๐Ÿ‘€

#

I haven't coded a bot for a while

slate swan
#

You gonna make one soon?

tacit token
#

bruh ur name

slate swan
frozen patio
slate swan
#

Nvm thatโ€™s Elon musk ๐Ÿ’€

frozen patio
#

That is very time-consuming

slate swan
frozen patio
#

IntelliJ

tacit token
#

or what?

slate swan
#

Who are you saying โ€œbruh your nameโ€ too

frozen patio
#

Me

#

Error?

crimson compass
#

why does it only reply with a?

crimson compass
frozen patio
#

Hmmm

slate swan
#

Also show your variables

crimson compass
#

yes sorry

frozen patio
#

Can you show your whole event as well?

crimson compass
#
excercise1='a'
excercise2='b'
excercise3='c'
Use_for = [excercise1,excercise2,excercise3]
excercise=(random.choice(Use_for))
    

embed = discord.Embed(
        title="**__Random Excercise:__**",
        description=(random.choice(excercise)),
        color=0x260af3)
    embed.set_thumbnail(
        url="https://cdn.discordapp.com/attachments/968378382595272714/968754973217263646/unknown.png")
    if message.content.startswith('.excercise'):
        await message.channel.send(embed=embed)
vale wing
#

You haven't implemented the commands in a right way yet?

vale wing
#

๐Ÿ˜ณ man

frozen patio
#

How are you sending an embed with no event or command?

slate swan
frozen patio
#

Oh

crimson compass
slate swan
crimson compass
vale wing
#

Because you get random value once and never override it

#

I already told you that like 2 days ago or smth

slate swan
#

Which wonโ€™t work, it will but only returns the one value

slate swan
#

Random.choice(Use_for) should work

hard trail
#

So I want it to log my bans however when I ban it doesn't put embed2 into my log channel. What's wrong? No errors

@bot.command()
async def ban(ctx, user: nextcord.Member, *, reason=None):
  guild = ctx.guild
  if reason == None:
    reason == "Not Specified"
  embed1 = nextcord.Embed(title="User Successfully Banned!", description = f"**{user}** has been banned!")
  embed2 = nextcord.Embed(title=f"Ban Information on {user}!", color = nextcord.Color.red())
  embed2.add_field(name="User", value = f"{user.mention}")
  embed2.add_field(name="Admin/Moderator", value = f"{ctx.author.mention}")
  embed2.add_field(name="Reason", value = f"**{reason}**")
  embed2.set_footer(text=f"User ID: {user.id}")
  embed3 = nextcord.Embed(title=f"Your Ban from {guild}", description = f"You were banned from {guild} because **{reason}**", color = nextcord.Color.red())
  if user.guild_permissions.manage_messages:
    error1 = nextcord.Embed(title='User is an Admin/Moderator!', color=nextcord.Color.red())
    await ctx.send(embed=error1)
    return
  else:
    if ctx.author.guild_permissions.ban_members:
      await guild.ban(user=user)
      await ctx.send(embed=embed1)
      await user.send(embed=embed3)
      log_channel = bot.get_channel(879095317771997246)
      await log_channel.send(embed=embed2)```
vale wing
#

Idk why but I have a mood of creating music generating AI

slate swan
#

how to make it?

vale wing
#

Mmmmmmm

slate swan
vale wing
#

Thumbnail

slate swan
#

thx

slate swan
#

!d discord.Embed.set_thumbnail

unkempt canyonBOT
#

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

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

Changed in version 1.4: Passing `None` removes the thumbnail.
vale wing
#

Yall said the same thing thrice just why

frozen patio
#

๐Ÿ˜‚

crimson compass
#

now it only replies with c

#

and what does override mean

slate swan
crimson compass
#

my english isnt very good

velvet tinsel
slate swan
frozen patio
vale wing
#

@crimson compass listen there's a simple concept - once you parse a value to the variable, it is stored there until you override the value or delete the variable

velvet tinsel
tacit token
vale wing
#

import java.util.Something; * 69

tacit token
frozen patio
frozen patio
#

But Java can get shit done.

vale wing
#

Ikr

slate swan
#

it work

vale wing
#

Gg

frozen patio
#

Java can also host itself

slate swan
#

es

tacit token
#

anybody want to use slash? if yes, and ur lib is d.py pm me.

vale wing
#

What do you guys think of a bot that generates music and plays it ๐Ÿค”

crimson compass
#

but thats still the same thing

#

there was no need to replace it

unkempt canyonBOT
#

6. Do not post unapproved advertising.

slate swan
tacit token
#

๐Ÿ’€ ๐Ÿ’€

#

this is the community.

slate swan
tacit token
#

yap this is nothing, right?

slate swan
dull terrace
#

up to 4k lines of code for the bot im working on froggy_chill

tacit token
#

but if u want to verify ur bot dc want to use slash

slate swan
#

you dont have to switch slash commanfs permanently, you have to request for the intent

#

to read messages

tacit token
#

do u have verified bot?

vale wing
#

I do ๐Ÿ‘

#

Migrating to slash commands is pretty easy ๐Ÿ˜€

crimson compass
tacit token
slate swan
vale wing
#

You mean how it works on low level?

slate swan
crimson compass
#

ok bro

vale wing
#

Well "average library enjoyers" probably don't

#

But advanced ones do ๐Ÿ˜‰

tacit token
slate swan
crimson compass
#
excercise1='a'
excercise2='b'
excercise3='c'
Use_for = [excercise1,excercise2,excercise3]
description=(random.choice(Use_for)),
embed = discord.Embed(
        title="**__Random Excercise:__**",
        description=(random.choice(description)),
        color=0x260af3)
    embed.set_thumbnail(
        url="https://cdn.discordapp.com/attachments/968378382595272714/968754973217263646/unknown.png")
    if message.content.startswith('.excercise'):
        await message.channel.send(embed=embed)```
vale wing
slate swan
#

lmao

#

probably trying to insult me instead turned out lame

tacit token
#

lmao

vale wing
#

You made an implementation of slash commands or something?

tacit token
crimson compass
#

bro

vale wing
slate swan
#

and nobody's insulting anyone

tacit token
dull terrace
#

Munchpopcorn always battles in here

tacit token
#

<@&831776746206265384>

#

please check the history

visual yarrow
#

Hello

tacit token
vale wing
#

Hi

visual yarrow
slate swan
crimson compass
#

the output is always the same

crimson compass
slate swan
#

and are you defining those in the on_message event?

crimson compass
#

yes

slate swan
# crimson compass ``` excercise1='a' excercise2='b' excercise3='c' Use_for = [excercise1,excercise...

sorry, I meant setting the description directly

excercise1='a'
excercise2='b'
excercise3='c'
Use_for = [excercise1,excercise2,excercise3]

embed = discord.Embed(
        title="**__Random Excercise:__**",
        description=random.choice(Use_for),
        color=0x260af3)
    embed.set_thumbnail(
        url="https://cdn.discordapp.com/attachments/968378382595272714/968754973217263646/unknown.png")
    if message.content.startswith('.excercise'):
        await message.channel.send(embed=embed)
formal basin
#

Please help me on this error I was making a slash command and this error popped up

heady sluice
#

it's not related but...

slate swan
heady sluice
#

and it helps if bot makes sense ๐Ÿ‘

heady sluice
slate swan
slate swan
heady sluice
#

one of them

slate swan
#

nvm

formal basin
heady sluice
#

you don't have to change the value you're taking

formal basin
#

Because thatโ€™s for to check if user has enough money

heady sluice
#

if bal[1] is a number in quotation marks, remove the quotation marks

formal basin
heady sluice
#

is cost in quotation marks

formal basin
heady sluice
#

well one of them is an str bro ๐Ÿ˜ข

formal basin
heady sluice
#
print(type(cost))
print(type(bal[1]))
```before the error occurs, can you do it
formal basin
heady sluice
#

print the types of the values...

formal basin
#

print(type(cost))
print(type(bal[1]))

heady sluice
#

!e

cost = 90
bal = "100"

print(type(cost))
print(type(bal))
unkempt canyonBOT
#

@heady sluice :white_check_mark: Your eval job has completed with return code 0.

001 | <class 'int'>
002 | <class 'str'>
formal basin
#

<class โ€˜strโ€™>
<class โ€˜intโ€™>

formal basin
#

Thatโ€™s what it printed out

heady sluice
#

so cost is in quotation marks

#

and you lied to me

formal basin
#

Ok

formal basin
heady sluice
#

just put int() around cost in the code

#

I suppose it's a number

hard trail
#

What's damn wrong. Every time I ban a user it doesn't send the embed2 to the log channel. No errors.

@bot.command()
async def ban(ctx, user: nextcord.Member, *, reason=None):
  guild = ctx.guild
  if reason == None:
    reason == "Not Specified"
  embed1 = nextcord.Embed(title="User Successfully Banned!", description = f"**{user}** has been banned!")
  embed2 = nextcord.Embed(title=f"Ban Information on {user}!", color = nextcord.Color.red())
  embed2.add_field(name="User", value = f"{user.mention}")
  embed2.add_field(name="Admin/Moderator", value = f"{ctx.author.mention}")
  embed2.add_field(name="Reason", value = f"**{reason}**")
  embed2.set_footer(text=f"User ID: {user.id}")
  embed3 = nextcord.Embed(title=f"Your Ban from {guild}", description = f"You were banned from {guild} because **{reason}**", color = nextcord.Color.red())
  if user.guild_permissions.manage_messages:
    error1 = nextcord.Embed(title='User is an Admin/Moderator!', color=nextcord.Color.red())
    await ctx.send(embed=error1)
    return
  else:
    if ctx.author.guild_permissions.ban_members:
      await guild.ban(user=user)
      await ctx.send(embed=embed1)
      await user.send(embed=embed3)
      log_channel = bot.get_channel(879095317771997246)
      await log_channel.send(embed=embed2)
vale wing
#

Should I create a bot that generates music and plays it in vc ๐Ÿค”

dire folio
#

Generates???

heady sluice
#

if bal[0] < int(cost):

vale wing
dire folio
#

Mad definitely should

vale wing
#

AI music generation

dire folio
#

Sounds really cool

vale wing
#

Like I already made AI antispam and it is good af (almost) and I wanna do something more advanced now

formal basin
heady sluice
formal basin
heady sluice
#

once the guy is kicked from the server, the bot won't be able to send him a message

#

cuz no server that both the bot and the guy are in

hard trail
heady sluice
#

should not affect anything

formal basin
heady sluice
#

what do you have in except

#

after the try

#

it's eating up the error innit

formal basin
formal basin
heady sluice
#

it says optional?

formal basin
#

Yes.

#

If you donโ€™t choose amount it will just give you 1

#

But if you use amount and type how much then it wonโ€™t do anything

#

And thereโ€™s no error

heady sluice
heady sluice
formal basin
heady sluice
#

your try-except

#

I don't know what it looks like

#

you gave half code

formal basin
#

try:
index = 0
t = None
for thing in users[str(user.id)]["bag"]:
n = thing["item"]
if n == item_name:
old_amt = thing["amount"]
new_amt = old_amt + amount
users[str(user.id)]["bag"][index]["amount"] = new_amt
t = 1
break
index += 1
if t == None:
obj = {"item": item_name, "amount": amount}
users[str(user.id)]["bag"].append(obj)
except:
obj = {"item": item_name, "amount": amount}
users[str(user.id)]["bag"] = [obj]

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

await update_bank(user, cost * -1, "wallet")

return [True, "Worked"]

async def open_account(user):

users = await get_bank_data()

if str(user.id) in users:
    return False
else:
    users[str(user.id)] = {}
    users[str(user.id)]["wallet"] = 0
    users[str(user.id)]["bank"] = 0

with open("bank.json", "w") as f:
    json.dump(users, f)
return True

async def get_bank_data():
with open("bank.json", "r") as f:
users = json.load(f)

return users

async def update_bank(user, change=0, mode="wallet"):
users = await get_bank_data()

users[str(user.id)][mode] += change

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

bal = [users[str(user.id)]["wallet"], users[str(user.id)]["bank"]]
return bal
heady sluice
#
    except:
        obj = {"item": item_name, "amount": amount}
        users[str(user.id)]["bag"] = [obj]
```this is bad
#

cuz it will do this if there's an error

#

and you won't know what the error is

formal basin
#

So what do I do?

heady sluice
#
except Exception as e:
    raise e
```or removing the try-except completely
#

if you wanna comment it out to keep the code for later, then do that

#

but for now, you need information

cloud dawn
heady sluice
formal basin
#

I got no error

formal basin
heady sluice
#

did it work tho

formal basin
#

Nope

heady sluice
#

that's what I thought

formal basin
#

So now what?

heady sluice
#

was t None at the end or something

formal basin
heady sluice
#

so t was 1

formal basin
formal basin
heady sluice
#

you don't have to ping me everytime

#

I'm thinking

formal basin
#

Sorry

heady sluice
#

what did it return

formal basin
#

No

#

Wait return what?

heady sluice
#

the func

formal basin
#

return [True, "Worked"]

#

Thatโ€™s all I see

heady sluice
#

so did it return this

formal basin
#

Yes

heady sluice
#

but it did not work

formal basin
#

Correct

heady sluice
#

what even happened when you did the command

formal basin
#

And the bot is running

heady sluice
#

bro it's not even supposed to respond you didn't do anything like await interaction.response.send_message() PepeCry

formal basin
#

No

heady sluice
#

lemme explain like this

#

you're only doing backend

formal basin
#

Here is what happens if I donโ€™t put an amount

heady sluice
#

no frontend

#

I assume there's still code

formal basin
heady sluice
#

the command

#

itself

formal basin
#

Ok.

#

And what do you think is wrong with it?

heady sluice
#

if I had to guess

#

I'd say in your command, you send this message if your function returned True

#

and it doesn't

formal basin
heady sluice
#

then it doesn't return anything, just stops somewhere

formal basin
#

Ok but I have enough money

heady sluice
#

I'm happy for you

formal basin
#

All I need to know is why wonโ€™t it let me buy a certain amount of an item

heady sluice
#

does the same code run when you don't input an amount

formal basin
#

But if I put an amount then no

#

I donโ€™t understand why it wonโ€™t do anything to put an amount

heady sluice
#

mmmmmmmmmmmmmmmm

formal basin
#

I donโ€™t think thatโ€™s how you make a slash command

formal basin
silver wolf
heady sluice
#

I so wanna see the whole command

formal basin
formal basin
heady sluice
#

ctx.message is NoneType

#

probably because ctx is a wrong named interaction which doesn't have a message

#

slash commands are not messages

#

nothing to do with each other

formal basin
#

@median bridge.slash(name="buy", description="use it to buy stuff")
async def buy(ctx, item, amount=1):
await open_account(ctx.author)

res = await buy_this(ctx.author, item, amount)

if not res[0]:
    if res[1] == 1:
        await ctx.send(f"That Object isn't there!")
    return
    if res[1] == 2:
        await ctx.send(
            f"You don't have enough money in your wallet to buy {amount} {item}"
        )
    return

await ctx.send(f"You just bought {amount} {item}")
tough stone
#

Hello everyone, where can I found the "Discord Event" documentation ? How to create event (for community guilds), manage, and delete etc. Thanks !

formal basin
# formal basin <@654847431984414742>.slash(name="buy", description="use it to buy stuff") async...

async def buy_this(user, item_name, amount):
item_name = item_name.lower()
name_ = None
for item in mainshop:
name = item["name"].lower()
if name == item_name:
name_ = name
price = item["price"]
break

if name_ == None:
    return [False, 1]

cost = price * amount

users = await get_bank_data()

bal = await update_bank(user)



if bal[0]  < int(cost):
    return [False, 2]

try:
    index = 0
    t = None
    for thing in users[str(user.id)]["bag"]:
        n = thing["item"]
        if n == item_name:
            old_amt = thing["amount"]
            new_amt = old_amt + amount
            users[str(user.id)]["bag"][index]["amount"] = new_amt
            t = 1
            break
        index += 1
    if t == None:
        obj = {"item": item_name, "amount": amount}
        users[str(user.id)]["bag"].append(obj)
except Exception as e:
    raise e

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

await update_bank(user, cost * -1, "wallet")

return [True, "Worked"]

async def open_account(user):

users = await get_bank_data()

if str(user.id) in users:
    return False
else:
    users[str(user.id)] = {}
    users[str(user.id)]["wallet"] = 0
    users[str(user.id)]["bank"] = 0

with open("bank.json", "w") as f:
    json.dump(users, f)
return True

async def get_bank_data():
with open("bank.json", "r") as f:
users = json.load(f)

return users

async def update_bank(user, change=0, mode="wallet"):
users = await get_bank_data()

users[str(user.id)][mode] += change

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

bal = [users[str(user.id)]["wallet"], users[str(user.id)]["bank"]]
return bal
heady sluice
#

!paste

unkempt canyonBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

formal basin
heady sluice
#

what

#

python is a programming language, pycord is a lib

formal basin
heady sluice
#

there u go

#

and this isn't even dpy

#

this is for sure a 3rd party lib

hybrid fjord
#

message.content exists to get the actual message, but how do i get an embed from an on_message? would it be message.embed?

heady sluice
unkempt canyonBOT
#
Noooooo!!

No documentation found for the requested symbol.

hybrid fjord
#

awkward

heady sluice
#

no, it's message.embeds[0]

hybrid fjord
#

ah thanks

heady sluice
#

yes, it's an embed object

#

you can get the title of the embed with msg.embeds[0].title

#

or description with msg.embeds[0].description

hybrid fjord
#

ah, i see. what about author stuff?

#

same concept i assume?

heady sluice
#

message.author

hybrid fjord
#

alright thanks

swift crane
#

hello

abstract dagger
#

discord bot assign roles on Redeemption of code and create code

#

can someone know these kind of bot building?

dire folio
#

What does that even mean

crimson nova
#

Guys i have got the problem with the error message: **ImportError: cannot import name 'PartialMessageable' from 'discord.channel' (/Users/...)**I have already tried to reinstall everything, but it doesn`t work? Does anybody know the problem?

quaint epoch
#

huh

maiden fable
#

did u try:

pip uninstall discord.py
pip install discord.py
maiden fable
#

Yea they are difficult

maiden fable
#

Yea long back

crimson nova
maiden fable
#

Nah, it was a private bot any way

maiden fable
#

Uh yea

#

But then I am going to sleep in like 5 min, sooooooo

crimson nova
crimson nova
slate swan
#

what version are you on?

crimson nova
crimson nova
slate swan
#

21.3.1 ๐Ÿ˜ฎ thats not even released yet

crimson nova
heady sluice
#

valid

brave forge
#

you do buttons via from discord_components import DiscordComponents, Button, ButtonStyle ??

slate swan
#

run pip list command in your cmd