#discord-bots
1 messages ยท Page 1034 of 1
yes
can you show it?
well then just tell me if you have this line in the on_error function
I'm not sure i follow. Here is the code block that is giving me an error whenever i try to add the role after bot.get_user. Is there a simple fix that i can make?
else:
print(f"ignoring exception in command", file=sys.stderr)
traceback.print_exception(type(error), error, error.__traceback__, file=sys.stderr)
``` Do you have this in your error handler?
add this in the else
you will need to import sys and traceback
@slate swan ๐ How do i fix this?
run and try to execute this command
nothing
wtf?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'url'
hi
๐ฟ
๐ฟ
as long as the bot has moderator
oh yeah, im dumb
thanks a lot
just ashley.exe not responding
uhhh
ok
๐ซ happens
blvcktvrsier joined my server out of nowhere
i have different error
๐ซ
show the error ๐คฃ
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.thumbnail.url: Scheme "b19286bd77e7fa537d08a5bce4707181" is not supported. Scheme must be one of ('http', 'https').
Curiosity 
joins too
lol sure
at least I can annoy blvck in two different servers in that way ๐
my bot got into 75 server but i cant even verify it
does someone have any idea how can i fix my command pls?
str(ctx.guild.icon)
my birthday is on december
i need to wait for 7 months sharp
9/12 lol
looks like no one knows how reaction role works ๐คฃ
i do 
error
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.thumbnail.url: Scheme "b19286bd77e7fa537d08a5bce4707181" is not supported. Scheme must be one of ('http', 'https').
bruh print ctx.guild.icon and ctx.guild.icon.url
im trying to get 2k pepo in there

just print them 
lol i ask this also
in the console
kk
lemme reply that msg real quick
for gu in bot.guilds:
print(gu.name, gu.owner.name)
here u go
sparky told me this
i havent try yet
u can become my little experiment rat
print([[server.name, server.owner.name] for server in bot.guilds])
u can do that?
theyre not equivalent, but yes
we're professionals here buddy, we don't take two lines of code for an iterations
LMAO
!d discord.Guild
class discord.Guild```
Represents a Discord guild.
This is referred to as a โserverโ in the official Discord UI...
we dont take two line
we take 1 line
u are really in everywhere
it has syntax error
well, it's Qwerty, what do you expect?
change server to guild i guess
how can i make a timer in timestamp like:
user uses ,timer 30m so the bot would send a timestamp of 30 minutes
if the user uses ,timer 56m then bot would send timestamp for 56 minutes from now
lol
then do ur bracket nicely :/
i did
any help
i need help
yeah cuz i forgot a "[]" lel
where
now it is typed correctly, check
?
i have the print cmd there
what did they print?
and what do i need to do with it
why
we are debugging your variables, so we can see what they are
just names of servers the bot is in and owners of the servers
bruh you had to print ctx.guild.icon and ctx.guild.icon.url lol
that was for another thing
After looking at the code, you are missing
bot.reaction_roles = Document(bot.db, "reaction_roles")
At the bottom of your bot.py file, right after bot.command_usage = .... If you need further help @jade tartan, don't hesitate to ping me.
error
what is the error?
seems like a discord thing, did you try writing some normal number first to see if it works
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: set_thumbnail() takes 1 positional argument but 2 were given
yeah ok i want to see the print, do you add the print statement before the set_thumbnail method?
yeah, small numbers work fine enough
no
did you use the url kwarg? url="link"
do it 
u know the difference between print and ctx.send right?
yes
I'm having a bad headache today, I'm not able to focus ๐
bruh before the set_thumbnail method write print(ctx.guild.icon, ctx.guild.icon.url)
print is in console ctx.send is chat in ds
tbh i had that issue once
but can't remember how i fixed it lol
๐ญ
thats weird
i can suggest a workaround if you're fine with that xD
it didnt print anything
no thanks, I don't want weird suggestions
print is output in console
ctx.send is output in discord channel
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'url'
check ur console not the discord channel
i did
Sad
then your headache will only increase 
but how is ur icon a string
what on earth did u do
ei it should be string
i'm also confused xD
wait
i know
is it string where is the docs
it is weird
nope it is an Asset object
gg
well, it should lol
the line is this print(ctx.guild.icon, ctx.guild.icon.url)
@slate swan also also, how do i add choices? ๐
surrend to my method 
what
i made little changes and it printed weird stuff
well too late i have a work to do now 
good luck with your work
he wants u to do some workaround
and i have no idea what is a workaround
option kwarg takes a choice kwarg
wonderful
*option decorator
huh
yeah that, got confused, thanks a lot
?
It is a stupid method to solve weird problems
stupid method = worsen everything
are u asian? @slate swan
but ur online time doesnt look like u are one
I'm from the UK ๐ im not asian
well.....
Nah they work fine
You will just need more check before do what you want
stupid method work for ||stupid|| people i guess jkjk
byebye gtg
Bruh that's my emoji
Stupid method works for weird issue
Otherwise they will be normal methods
what is a typing_extensions error?
This is discord.py before the rewrite, update your discord.py to either v1.7.3 or master branch.
oh okk i get the concept now thanks
ratestaffmsg = await channel3.send(embed=embed)
await ratestaffmsg.add_reaction('\U00002705')
def check(reaction, user):
return not user.bot and str(reaction.emoji) == '\U00002705' and reaction.message == ratestaffmsg
try:
reaction = await self.bot.wait_for('reaction_add', timeout=180.0, check=check)
await channel3.send("approved")
await ratestaffmsg.clear_reactions()
except asyncio.TimeoutError:
await message.clear_reactions()
await ctx.send(f'no reaction in 180s (DEBUG).')
return
await ratestaffmsg.add_reaction('\U0000274C')
def check(reaction, user):
return not user.bot and str(reaction.emoji) == '\U0000274C' and reaction.message == ratestaffmsg
try:
reaction = await self.bot.wait_for('reaction_add', timeout=180.0, check=check)
await channel3.send("denied")
await ratestaffmsg.clear_reactions()
except asyncio.TimeoutError:
await message.clear_reactions()
await ctx.send(f'no reaction in 180s (DEBUG).')
return
how can i make these appear at the same time vs one after the other?
whats the ... for
ah
did you fix your command? 

Nah, I've lost my mind
my offer is still valid 
and i have yet to locate what the arguments id put in lmao
everything you pass in open is valid for aiofiles.open
Stop providing false information, it is usable
umm idk what id pass for that. i just need to save the file and then attach it to a message
PUHAHAHAHAHAHAHAHA no bro
replit is the worst hosting service in the human history
I beg to differ I agree
Hahahahaha
Disagree
Any help?
Just use asyncio.sleep
do you want it like to send current time + the time that the user has sent?
I mean, just in hosting cases, replit is good overall ๐
Yes
insert how dumb ii feel since i cant solve it
Yeah
first you will have to convert the time that user sent in a timedelta object
!d datetime.timedelta
class datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0)```
All arguments are optional and default to `0`. Arguments may be integers or floats, and may be positive or negative.
Only *days*, *seconds* and *microseconds* are stored internally. Arguments are converted to those units...
Anyone got creative promotion ideas for a discord bot? 
then you just take the current time using datetime.datetime.now() or datetime.datetime.utcnow() and sum the two dates
then you can convert in any format you like using strftime()
ratestaffmsg = await channel3.send(embed=embed)
await ratestaffmsg.add_reaction('\U00002705')
await ratestaffmsg.add_reaction('\U0000274C')
def check(reaction, user):
return not user.bot and str(reaction.emoji) in ['\U00002705','\U0000274C'] and reaction.message == ratestaffmsg
try:
reaction = await self.bot.wait_for('reaction_add', timeout=180.0, check=check)
if str(reaction.emoji) == '\U00002705':
await channel3.send("APPROVED")
elif str(reaction.emoji) == '\U0000274C':
await channel3.send("DENIED")
else:
await channel3.send("wtf")
any reason why this wouldn't work?
What is the problem? 
it applies the emojis and then nothing happens when i click either
hey who was that guy that found a way to determine if someone is lurking or not?
dm me the command
plz i need it desperately
any error?
File "C:\Users\allan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\allan\OneDrive\Documents\mootbot\cogs\Commands.py", line 1159, in rate
if str(reaction.emoji) == '\U00002705':
AttributeError: 'tuple' object has no attribute 'emoji'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\allan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\allan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\allan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'tuple' object has no attribute 'emoji'
Tbh idk how to
whoops thought i had sent the error, mb
seems like that your wait_for is returning a tuple, dunno why tbh
it isn't so hard, you can google the stuff you need, to convert the time you can do it like this:
so any idea on how i can fix / alternatives? :/
for wait_for("reaction_add") you need 2 args, reaction and user
reaction, user = await bot.wait_for("reaction_add")
it worked fine when i only had 1 emoji
it was since i added py in ['\U00002705', '\U0000274C']
and
if str(reaction.emoji) == '\U00002705':
print(reaction.emoji)
await channel3.send("APPROVED")
elif str(reaction.emoji) == '\U0000274C':
print(reaction.emoji)
await channel3.send("DENIED")
else:
await channel3.send("wtf")```
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
import datetime
time_formats = {"s": "seconds", "m": "minutes", "h": "hours", "d": "days", "w": "weeks", "y": "years"}
time = "30m"
if time[-1] in time_formats.keys():
delta = datetime.timedelta(time_formats[time[-1]] = time[:-1])
print(delta)
dunno if this works but you can get the idea
try Greedy[disnake.Member]
i got an arg in my command and i wanna do like if user only sends the command the bot should respond with something like "do this or put thi"
Do if arg=None or False
i forgot which one but ik its 1
or you can make a command error
what does 'ERROR:discord_webhook.webhook:[1/1] Webhook status code 400: {"embeds": ["0"]}' mean?
im using discord_webhook lib
if i have a dir tree like ```
discord-bot(dir)
|
|
|-----cogs(dir)
| |
| |-----mute.py(has mute cog subclass, all functions related to muting)
| |-----ban.py(has bancog subclass, all functions related to banning)
| |-----bookmark.py(has bookmark cog subclass, all functions related to bookmarking)
|
|-----main.py(should get all cog classes from .py files in cogs dir)
how would i get the cogs from the .py files in the cogs dir
that was a pretty nice dir tree if i do say so my self
hi guys I want to ask how can I install the discord.py
All the cogs in the files?
yes
py -m pip install discord
Windows 7 ๐ซ ๐ซ
lol
It's still this
Haha I really love Windows 7
do you have pip installed
I think perhaps not.
Where can I install it
This one?
Sorry I'm completely new to python
you'll have to install and reinstall python if it is not installed already
it should come with every build
ok I'll try it thanks
windows 9 is better
@white plume what's yr Python version?
3.8.10
Can you paste the whole error?
Hi hunhun
Hi
Hey @white plume!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
lmao
!paste
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.
How to use User timeout discord feature in discord bot?
I want to track the time
anybody know why my webhook is not sending?
unknown
im getting '[1/1] Webhook status code 400: {"embeds": ["0"]}'
and its not sending the webhook
im using discord_webhook
it doesn't say invalid webhook
from discord_webhook import DiscordWebhook, DiscordEmbed
webhook = DiscordWebhook(url="my hook")
embed = DiscordEmbed(title="Error", description="aborted", color='ff8a00')
webhook.add_embed(embed)
webhook.execute()
@slate swan
the webhook is correct too
ohh wait
Bro wtf
Ur code
Is
?
you set up embed incorrectly
Yes it is correct
gimme a moment, i need to see that library:s docs
Very
No
what's wrong with it?
its import discord
then discord.Embed()
what?
discord.py has nothing to do with webhooks
It does, but not in your example
Seems correct to me I guess, tried without embed?
Code
@bot.command(name="lnk")
async def lnk(ctx, link):
print(Fore.YELLOW + ctx.message.content + Fore.WHITE)
#assuming this is inside a command
# I recommend creating a single ClientSession and storing it in a botvar
async with aiohttp.ClientSession() as session:
image = await session.get(link)
async with aiofiles.open('image.png', 'wb') as f:
await f.write(image.content)
How do I attach the retrieved file to a message?
it works without embeds
Color is most likely 0xff8a00 no?
well it seems to be correct as per the example they gave on their pypi page
you can change it
not really
Oh yeah docs says it works like that - horrible way of doing it
Yeah it used to work
i don't know why it doesn't now
all you want to do is send a webhook message right? nothing to do with a bot?
Yep
nothing to do with a bot
just use this
what is this
this sends 1 message and i have to do it manually
how can i do the way they've done that syntax box in an embed?
look into args
Any ideas?
i just mean the formatting
ohh, u mean the color?
the box yea
code blocks
how do you do the small one like they've done around p.help <command>
and idk what the formatting thingy is
p.help <command>
just 1 ` on each side
ok thanks
hm I'd just use discord.py
!d discord.Webhook.from_url
classmethod from_url(url, *, session, bot_token=None)```
Creates a partial [`Webhook`](https://discordpy.readthedocs.io/en/master/api.html#discord.Webhook "discord.Webhook") from a webhook URL.
Changed in version 2.0: This function will now raise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.10)") instead of
`InvalidArgument`.
!d discord.Webhook.send
await send(content=..., *, username=..., avatar_url=..., tts=False, ephemeral=False, file=..., files=..., embed=..., embeds=..., allowed_mentions=..., view=..., thread=..., ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Sends a message using the webhook.
The content must be a type that can convert to a string through `str(content)`...
doesn't really asks you to create a bot, needs a basic async fucntion tho
how to add required options and options description to slash commands in nextcord
Use docstrings for descriptions and for required options do not set a default value
i think it would be ```py
async def mute(ctx, member: disnake.Member, reason: str='None'):
^^^^^^ ^^^^^^
|||||| not mandatory, because there is a default value
mandatory, because it doesn't default```
When you realize all these api wrappers break all this down to a json string
the post requests to the api for registering commands and events
hm they are json payloads.. not a string though isn't it
yeah
well yea mb
Although
i forgor how to install discord.py 2.0, someone tell me lol
from discord import Client, Intents, Embed
from discord_slash import SlashCommand, SlashContext
bot = Client(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)
bot.run("token")
When i run this, and type/test in discord, I don't see it. Why?
The reason I said that was because I rmr when dealing with apis the json obj gets stringify-ied
the effects of using a really nice slash command wrapper
What should i do
๐ญ
upgrade to d.py 2.0 and use the slash commands from there I'd suggest
pip install git+https://github.com/Rapptz/discord.py
As long as u have git installed u can get the latest from there
um I'm sorry I'm little bit confused what am I supposed to do exactly to add that to my code?
@bot.slash_command(name='search', description='Search for a specific dish!')
async def searchforrecipe(ctx, name:str):
it's an example
you're doing it perfectly
it's a mandated arg, name
how to use hybrid cmnd ?
And how can I add the description to the option?
do description="description" in the decorator
Still mp idea myself
await ctx.send("image underneath", file=discord.File("image.png"))```
library?
that adds the description to this do not to an option
Starting Bot
Connecting to Discord API.
Please Wait
Loading Developer Features cog
[โ][Developer Features Cog] Loading Complete
Connected!
Bot is ready!
Waiting For Commands
$lnk https://cdn.discordapp.com/attachments/798726720181633047/968876223637893210/unknown.png
Ignoring exception in command lnk:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 169, in wrapped
ret = await coro(*args, **kwargs)
File "<string>", line 114, in lnk
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/aiofiles/threadpool/utils.py", line 45, in method
return (yield from self._loop.run_in_executor(self._executor, cb))
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
TypeError: a bytes-like object is required, not 'StreamReader'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/bot_base.py", line 570, in invoke
await ctx.command.invoke(ctx)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 920, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/disnake/ext/commands/core.py", line 178, in wrapped
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: a bytes-like object is required, not 'StreamReader'
wwhat?
yes
You want to use the option decorator for that
An example would be
@commands.slash_command(
ย ย ย ย ย name="kick",
ย ย ย ย ย description="Kickย aย userย outย ofย theย server.",
ย ย ย ย ย options=[
ย ย ย ย ย ย ย ย ย Option(
ย ย ย ย ย ย ย ย ย ย ย ย ย name="user",
ย ย ย ย ย ย ย ย ย ย ย ย ย description="Theย userย youย wantย toย kick.",
ย ย ย ย ย ย ย ย ย ย ย ย ย type=OptionType.user,
ย ย ย ย ย ย ย ย ย ย ย ย ย required=True
ย ย ย ย ย ย ย ย ย ),
ย ย ย ย ]
)
try brief=""
isn't it disnake?
On discord.py it's not @bot.slash_command
they are using nextcord, from what they said
In that case use a default value to your option to SlashOption(description="Description here")
Need to import using from nextcord import SlashOption though
So like
async def command(interaction: Interaction, arg: str = SlashOption(description="Description here")):
It works thanks!
@commands.command(name="rate")
async def rate(self,ctx,member: discord.Member=None, rating=None, *, reason=None):
await ctx.message.delete()
membermention = member.mention
pfp = member.avatar_url
guildicon = ctx.guild.icon_url
if member == None:
await ctx.send("Please mention the member you wish to rate!", delete_after=5)
return
anyone know why this just doesn't send anything if i solely do -rate? it should send the message, no?
there is problem with line ctx.guild.icon_url i have the same problem in my code
delete that line and it should work
its ctx.guild.icon.url in discord.py 2.0 / forks
nah same thing happens
nothing happens, nothing in cmd and nothing in discord
Does anyone know how i can make a /setupchannel [DISCORDCHANNEL] and store the guild ID : setupchannel for that guild to an SQLite database
no video tutorials seem to show me
Help pl
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice i have discord py voice installed and pynacl installed
hey guys i'm trying to add interaction in the next code but founding myself stuck,
@Mybot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.MissingAnyRole):
await ctx.message.delete()
await interaction.response.send_message("Sorry but you dont have the permissions required for this command.", ephemeral=True)
return
need to make line 5 working with interaction.response.send_message
Nice 4 problems to solve
Case matters: CommandOnCooldown
Make a column and insert it easy
How did you install pynacl
I know to make a column etc. How do i code it?
You mean sql statement or smth
i did it once manually and it didn't work so i uninstalled discord py and pynacl and reinstalled to let it be installed automatically and still doesn't work
aiosqlite connect
How do i set it up? And to prevent SQL injections
@vale wing
!sql-fstrings
SQL & f-strings
Don't use f-strings (f"") or other forms of "string interpolation" (%, +, .format) to inject data into a SQL query. It is an endless source of bugs and syntax errors. Additionally, in user-facing applications, it presents a major security risk via SQL injection.
Your database library should support "query parameters". A query parameter is a placeholder that you put in the SQL query. When the query is executed, you provide data to the database library, and the library inserts the data into the query for you, safely.
For example, the sqlite3 package supports using ? as a placeholder:
query = "SELECT * FROM stocks WHERE symbol = ?;"
params = ("RHAT",)
db.execute(query, params)
Note: Different database libraries support different placeholder styles, e.g. %s and $1. Consult your library's documentation for details.
See Also
โข Extended Example with SQLite (search for "Instead, use the DB-API's parameter substitution")
โข PEP-249 - A specification of how database libraries in Python should work
this is for sql injections
Pretty sure they have docs on their repo on github and yeah it works just like common sqlite but with coros
And yeah wdym "prevent sql injections"
Why'd you want to prevent them
anybody now how to add interaction to my code?
Pretty sure event for app commands errors is different
No i want sanitise any data inbound from the user before adding it to the database
as im taking user input
Anyways idk about that I don't use dpy 2.0
and what i do
"CommandOnColdown"?
Ctrl+c
can you tell me what is the best way to error handle commands ?
it's only tht?
Yes if you read the error
Idk about dpy
oh
Search event reference
ok thanks
If you want to see how I handle them check this out https://github.com/Exenifix/AIAS/blob/master/ext/system.py#L22-L40
@fluid zodiac
๐
i want to do a chat filter i have a variable with a list and i want to read all the messages and if is in the list delete the message, but i don't know how to read all the messages
ik
do
if any(x for x in [LIBRARY] if x in [MESSAGE]:
any?
thats a simple one i found @sacred oyster idk if ur looking for that
well if any of the words in your library of filtered words are sent in a message
Yes you await loading extensions and adding cogs and make setup funcs async also put extensions loading into setup_hook method of your bot subclass
I have this
AttributeError: 'client' object has no attribute 'load_extension'
that's where the error is
the client class cant have extensions
you need to subclass the Bot class
Im sorry but, how do I do that?
use discord.ext.commands.Bot instead of discord.Client
oh okay
Noice
class client(discord.ext.commands.Bot):
def __init__(self):
super().__init__(
command_prefix = '$',
intents = discord.Intents.default(),
application_id = 770696433573036054),
self.synced = False
async def setup_hook(self):
await self.load_extension(f"cogs.estado")
await client.app.sync(guild = discord.Object(id=770698123915165747) )
async def on_ready(self):
await self.wait_until_ready()
print("El bot estรก ONLINE.")
if not self.synced:
await client.app.sync(guild = discord.Object(id=770698123915165747))
self.synced = True
aclient = client()
aclient.run(os.getenv("TOKEN"))```
should comamnds.Bot subclass ( in case its raising an error)
๐
Why does it say the extension is already loaded? It should unload it
oh
thats not how arguments in python work
i think i know why
what's the extension?
i want to use it
@slate swan
thats a cog...
because,
you parameters are ctx, on, off
and when you run the command
ctx, on, off
!antibot off
that means that off is taking the place of on and off was always None
why is it total black?
wdym
discord bot testing be like
@Mybot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.MissingAnyRole):
await ctx.message.delete()
await interaction.response.send_message("Sorry but you dont have the permissions required for this command.", ephemeral=True)
return
how can i make my interaction work here?
i think it would be ctx.response.send_message
@quaint epoch your repeater is up!
yea but still not working
errors?
1sec
Ignoring exception in on_command_error
Traceback (most recent call last):
File "E:\Softwares\PyCharm\PyCharm 2021.3.3\pythonProject\venv\lib\site-packages\nextcord\client.py", line 417, in _run_event
await coro(*args, **kwargs)
File "E:\Softwares\PyCharm\PyCharm 2021.3.3\pythonProject\DiscordBot\main.py", line 13, in on_command_error
await ctx.response.send_message(f"Sorry but you dont have the ability to perform actions here", ephemeral=True)
AttributeError: 'CachedSlotProperty' object has no attribute 'send_message'
uhhh, nextcord
i don't know what that object is, can't help
how can i let my bot say something if he didnt find any warns about the user?
all im trying is when error will apear will send back to the user on hidden message in the same channel that he cant use this action
if not(user.id in warns):
return await ctx.send('no warns for this user')
ever since i switched to pycord, all my dropdowns stopped working. any ideas why?
different syntax to d.py 1?
yes
but there's no error in the console
show callback func
it was working fine before i switched
bruh
hmm
dhooks is saying my discord webhook is invalid when it is
pycord uses the discord namespace.
anybody know why??
?
discord.xx
oh right
switching from one lib to another, and your code working, is even scarier than it not
Why would you even switch from dpy to pycord.
not really, pycord is just discord.py but maintained
gotta test each and every single command to make sure they work
Discord.py is maintained..? I think you are reading old info.
not entirely sure, i think i did it for a specific feature
well 2.0 is
but when i tried switching my whole entire code broke
dpy prolly has it
So out of ease you switch to a fork that has more than 10 flaws and optimization issues.
switch back
I'm not experiencing any issues.
I also don't understand why that concerns you. I was aware of that when I made my choice.
They have a migration to v2.0 guide https://discordpy.readthedocs.io/en/master/migrating.html in case you want to change one day to 2.0
Thank you.
I think itโs more important we help someone with an issue they have instead of pestering them about their choice of library
I think it's more important of making people aware that certain forks/ extensions are poorly made. Switching to a library out of ease isn't something I support.
WHY IS EVERYTHINMG SO FU*** TOTAL BLACK

tf
I CANT SEE THE CHANNEL IM WRITING IN FELLA
crazy how you can type
THE LEFT OF MY SCREEN IS BLACK
I CAN SEE MY KEABOARD DUMBO
May you stop?
<@&831776746206265384>
why you ping
^
but you said total.
total black
Then keep this out of here please, also no need to insult .
i mean black
Please respect channel topics, and respect other server members.
you guys trolling?
leave.
who did i not respect
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
but i already was aware 
i keep telling you that i cant see other channels
For example, everyone you disrespected with "dumbo".
do you even know what dumbo means
Then get in this channel
!ot
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
guys stop
bye
Logs exist, no need to edit your messages
stop.
how old are you.
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
Yet again.
Just don't react guys, let mods handle this.
bro actually evel stop
pls stop disrespecting orders given by moderators
thanks.
Your mouse wheel is most likely working, you can scroll up
nahh
Krypton forget it.
krypton dont reply to him he'll keep talking then
pls lets go on topic
Suggest more topics here!
shh mana s
Sorry was afk
!mute 951510224047583242 1d Take a break, and re-read our #code-of-conduct and #rules. Spamming a topical channel and insulting other server members are things we do not care for here.
:x: The user doesn't appear to be on the server.
๐ฅณ
is there an example of slash commands in discordpy 2.0
#discord-bots message this was his first message.
he**
!mute 951510224047583242 1d Take a break, and re-read our code-of-conduct and rules. Spamming a topical channel and insulting other server members are things we do not care for here.
:x: The user doesn't appear to be on the server.
Not really but I could help you.
No problemo
Appreciate your help
What do you got so far?
import discord
bot = discord.Bot()
@bot.event
async def on_ready():
print(f"We have logged in as {bot.user}")
@bot.slash_command(guild_ids=[973254205567549510])
async def hello(ctx):
await ctx.respond("Hello!")```
Have you made a Discord bot before this?
Heya, I wasn't sure how to explain my problem - the first part of the video is to demonstrate how the bot works, from 00:25 onwards it demonstrates the problem
(u can probs understand the problem directly just by skipping to that part - aka 00:25)
errm, I will make an example today, @jovial plover It's a bit hard to explain. It also needs much custom solutions since not everything is build-in.
Heya guys, is it allowed to ask questions in here yeah?
import interactions
bot = interactions.Client(token="enter_token")
@bot.command(
name="my_first_command",
description="This is the first command I made!",
scope=973254205567549510,
)
async def my_first_command(ctx: interactions.CommandContext):
await ctx.send("Hi there!")
bot.start()
@cloud dawn this worked
I got no clue as what this library is.
you can also use discord.py 2.0
Yeah I wouldn't use that anymore
It used to be "good" when discord.py had no slash commands and got discontinued
Then forks came with slash commands, already at that point it became kind of 'pointless' to rely on that library
yeah
damn i finally figured out SQLite with discord.py

aiosqlite?
its probably easy but my dumbass took ages
yea
good for you ๐
tbh there is a way to use sqlite with d.py
Without having any issue
๐ค
thanks
now i have to embed it into my previous bot which will set off hours of error fixing
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: RuntimeError: PyNaCl library needed in order to use voice i have discord py voice installed and pynacl installed
PyNaCl is most likely not installed, otherwise you wouldn't get that error
i do have it installed
Double check, that error wouldn't come
Are you using a venv?
uh sorry what is that
Ah
i have it working fine on one pc
I would strongly suggest you use venvs to avoid issues like these
i will go google what that is haha
Good idea
!venv
Virtual Environments
Virtual environments are isolated Python environments, which make it easier to keep your system clean and manage dependencies. By default, when activated, only libraries and scripts installed in the virtual environment are accessible, preventing cross-project dependency conflicts, and allowing easy isolation of requirements.
To create a new virtual environment, you can use the standard library venv module: python3 -m venv .venv (replace python3 with python or py on Windows)
Then, to activate the new virtual environment:
Windows (PowerShell): .venv\Scripts\Activate.ps1
or (Command Prompt): .venv\Scripts\activate.bat
MacOS / Linux (Bash): source .venv/bin/activate
Packages can then be installed to the virtual environment using pip, as normal.
For more information, take a read of the documentation. If you run code through your editor, check its documentation on how to make it use your virtual environment. For example, see the VSCode or PyCharm docs.
Tools such as poetry and pipenv can manage the creation of virtual environments as well as project dependencies, making packaging and installing your project easier.
Note: When using Windows PowerShell, you may need to change the execution policy first. This is only required once:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Or that
will i have to manually reinstall the all the modules in the virtual environment?
Any good MySQL libraries?
Probably
But it isolates your packages so you donโt have to deal with these issues
!pip aiomysql
Thank you!
considering you are using an async Library ( as per the channel topic)
Does sqlalchemy support asyncio?
Interesting. I would suggest that then
how would i send a value from a sql table
For an dpy slash example best to do an advanced version?
Wdym?
Well I'm making an example for slash command in dpy
Isnโt there on already?
I was trying to make one when dpy first unarchived but I got too lazy lol
My plan was to just port the one in the gist, if you want to an one doesnโt already exist you can do that if youโd like
But those are single file.
You want a multi file example?
Iโd say go for it, but we donโt have any multi page examples atm
how to do that if the user writes something his AFK goes away?
how would i make a list of specific options using slash as shown here using discord-slash
this library does not, and will never support autocompletes
i have a list i loop through till it reaches it end and every loop i add a field
how can i do if the embed has more than 5 fields it makes a pagination?
store the user data somewhere db or json add an on message event check if the user is the same as the data that you stored and if its the same write something and delete the data
Huh?
didn't they stop maintaining the library and migrated to interactions.py already?
last updated on December 2021
Hey I need some help with sqlite3 with my discord bot. My table has the column Wallet, and i want it to send the Wallet number for the specified user id
"SELECT User_Id, Wallet FROM Database WHERE User_Id = 704839281838915675"
I have this for selecting what I want, i just dont know how to make the bot say the Wallet value
and sometimes the bot would just send the content in the image below, but now i just dont know how i can do anything
not what im looking for, i want if its more than 5 fields it should add another page
@sick birch https://github.com/Pandabweer/dpy-slash-example
someone?
i dont really understand but instead of adding a new field you can add /n which goes to the next line
can you show how you created that table
connect.execute('''CREATE TABLE Database (
User_Id INTEGER,
Wallet INTEGER,
Bank INTEGER,
Shovel INTEGER
);''')
i did that once then #'d it out
ah, great you sure that data with thst user_id is in the db?
sqlite file viewer
you can use this to see
yes
when i print it i can see it i just dont know how to make it go into lets say an embed
oh, may i see your code
for the part which you send here
because getting information involves fetchone()/fetchall() too
yeah although i changed it cuz i tried to fix but idk what im doing
@client.command()
async def wallettest(ctx):
con = sqlite3.connect("TEST.db")
cur = con.cursor()
cur.execute("SELECT User_Id, Wallet FROM Database WHERE User_Id = 704839281838915675")
pprint(cur.fetchall()[0:5])
row = "SELECT User_Id, Wallet FROM Database WHERE User_Id = 704839281838915675"
userid = row("User_Id"[1:-1])
ctx.reply(f"{int(userid)}")# format(row["userid"], row["Wallet"[1:-1]]))
con.close()
cur.fetchall() is the all results, why not send it?
it sent [] last time iirc but lemme change it back rq
@client.command()
async def wallettest(ctx):
con = sqlite3.connect("TEST.db")
cur = con.cursor()
cur.execute("SELECT User_Id, Wallet FROM Database WHERE User_Id = 704839281838915675")
pprint(cur.fetchall()[0:5])
await ctx.reply(f"{cur.fetchall()}")
con.close()```
there @slate swan
it sends [] again
and what does it print?
assign a single variable to fetchall and use it in both print and send
ok ill try
data = cur.fetchall()
print(data)
await send(data)
i guess that happens because the cursor resets the selection when a fetch is called, not sure though
yeah,
it returned this to me:
how would i make it so there are no () or []
[] is the list of ()s ,
where () is your selections ( select user_id, wallet )
what data do you want to show?
wallet, i dont need userid
well then just select the wallet from the database
select wallet from database where ... ;
it will appear as a list of wallet data
whats the best way to make it so that every time an error occurs discord bot/webhook will send out that error
!d discord.on_error
discord.on_error(event, *args, **kwargs)```
Usually when an event raises an uncaught exception, a traceback is
printed to stderr and the exception is ignored. If you want to
change this behaviour and handle the exception for whatever reason
yourself, this event can be overridden. Which, when done, will
suppress the default action of printing the traceback.
The information of the exception raised and the exception itself can
be retrieved with a standard call to [`sys.exc_info()`](https://docs.python.org/3/library/sys.html#sys.exc_info "(in Python v3.10)")...
Well I mean at least I got half of your understanding
.name not .mention
@bot.event
async def on_ready():
print("bot running")
async with aiosqlite.connect("spooky.db") as db:
async with db.cursor() as cursor:
await cursor.execute('CREATE TABLE IF NOT EXISTS users (channel_id INTEGER , guild_id INTEGER , welcome TEXT, goodbye TEXT , message TEXT)')
await db.commit()โ
does this look good or do i replace welcome and goodbye with INTEGER instead of TEXT?
how to get the id of the role that the bot made
guild.create_role()
@slate swan for filename in os.listdir('./cogs'): if filename.endswith('.py'): client.load_extension(f'cogs.{filename[:-3]}')
Is that what you're talking about?
Are you on 2.0?
There was a breaking change where load_extensions was made a coroutine
Are you talking about the python version?

Why should you change it's type?
because on the error it says no table name: welcome
but i do have the welcome table
so I suspect is the variable TEXT
You sure?
im going to double check...
Yup, looks like you're on the old version, so it's fine
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 979, in on_message
await self.process_commands(message)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 976, in process_commands
await self.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1348, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 855, in invoke
await self.prepare(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 777, in prepare
if not await self.can_run(ctx):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1087, in can_run
return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\utils.py", line 350, in async_all
elem = await elem
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\cogs\reactions.py", line 15, in wrap_func
data = await ctx.client.config.find(ctx.guild.id)
AttributeError: 'Context' object has no attribute 'client'
@commands.guild_only()
#@commands.has_guild_permissions(administrator=True)
@is_setup()
async def rr_toggle(self, ctx):
"""Toggle reaction roles for this guild."""
data = await self.client.config.find(ctx.guild.id)
data["is_enabled"] = not data["is_enabled"]
await self.client.config.upsert(data)
is_enabled = "enabled." if data["is_enabled"] else "disabled."
await ctx.send(f"I have toggled that for you! It is currently {is_enabled}")```
Does that mean i have to add a json file?
what's in line 15
.bot
Doesn't matter if your commands.Bot variable is called client, it's still Context.bot
It does I am pretty sure
yes and not sure
I tried in quart and did not go well
I want to try in flask
But I am not sure if it's possible so I thought I would ask
yes to both
You should ask for help/discuss about web development in #web-development
does anyone know why the files changed and the insertions are completely wrong? i only changed one file and removed 3 characters but its saying i did a whole lot more
heres the code: https://mystb.in/SoftballCopiesVenues.python
Anyone here know how to take input from a user from a discord bot in dpy
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\cogs\reactions.py", line 84, in rr_channel
reaction_roles = await self.client.reaction_roles.get_all()
AttributeError: 'Reactions' object has no attribute 'client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "c:\Users\thoma\OneDrive\Desktop\discord server bot\Bot2.py", line 27, in on_command_error
raise error
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1348, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Reactions' object has no attribute 'client'
!d discord.ext.commands.Bot.wait_for
wait_for(event, /, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Waits for a WebSocket event to be dispatched.
This could be used to wait for a user to reply to a message,
or to react to a message, or to edit a message in a self-contained
way...
The object doesn't have a client attribute also, please learn how to read tracebacks
No one ever expects the duck
Wait is it this?
wait_for?
What's Reactions?
Ok what am trying to do cuz my english is my 2nd language and itโs hard for my to explain but my point that I am trying to make is I am making a reaction role that users can react like emoji reactions and when someone reacts to this emoji they will be able to see the rest of of my server
with buttons, how do i detect the user who clicked
If you're using discord.py and you're doing it properly, d.py should pass in a discord.Interaction instance to your button's callback. You can use interaction.user to find out who clicked on it
and how do i disable a button after 5 minutes if nobody clicked it?
ok ill test that
on_timeout
can u elaborate a bit
Sure. Pass in the timeout= kwarg to your discord.ui.View() instance, and override the async def on_timeout(...):, and disable it from there
๐ถ
You're gonna have to subclass ui.View for this by the way
!d discord.ui.View
class discord.ui.View(*, timeout=180.0)```
Represents a UI view.
This object must be inherited to create a UI within Discord.
New in version 2.0.
where can i read about everything u just said cuz i dont understand that and i dont want to bother u more
I'd suggest the examples on github
https://github.com/Rapptz/discord.py/blob/master/examples/views/counter.py This example seems to be similar to what you're doing - it may help
what would that do
i just wanna
and
Install discord.py with button and components support
....git?
Doesn't really matter if u add it or not
req alr satisfied
Hi
@cloud dawn
Updates your discord.py to v2.0.0
You can't get that message with git+ direct downloads
i did pip install discord_components
discord_components... distasteful
It's usually a better choice to use components provided by the mainstream libraries rather than 3rd party ones
so what do you recommend i use
i am using discord.py
Not 2.0
how do i get 2.0 then
Use views!!
https://github.com/Rapptz/discord.py check the README
how is github mainstream tho
discord.py is mainstream
If we're talking about version control systems, github is mainstream
Run the powershell then paste this pip install git+https://github.com/Rapptz/discord.py.git
I rmr when discord just dropped slash on us and I used that library
Quickly stopped myself
It was a pain to use properly
is that safe @sick birch
Many people did. It was a smart move on their part, they made a quick and dirty library for components and slash commands, and people were scrambling so they used that. Very ingenious, but doesn't work long term
Yes
I agree
will it mess up my button things now?
GitHub is mainstream enough to overlook the issue with microsoft backing it, but tbh I'll prob switch to gitlab
What are you using now?
discord_components
Yes, it's going to be different
Discord components + views smh
Worst thing that can happen is your computer transforming into a Discord bot.
..
It will but for your betterment you should switch
ok and where can i learn to use it
I'd say the docs has good examples of how to implement the new features easily
Really is straightforward
Yeah you're gonna need to install git
Not gonna work
https://github.com/Rapptz/discord.py/tree/master/examples is where the examples you want are
you need to prefix it with git+
irdk
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git should be relatively easy
..
Still prefer sudo pacman -S git
pacman
i am kinda confused i just wanna know how to download this lmao
sudo, gross
Listen
doas pacman -S git
U need to download git
isnt git dangerous
Download git first, then follow the instructions
No?
somewhat
No
ok where to download
It's the most used version control system, it's completely safe
Given that you're not cloning random repos
git
speaking of pacman, just got a notification that polybar made it into the community repo ๐
We bring the awesome Git VCS to Windows
Polybar is nice, but you really need to rice in order to make it look good
I'd just get it from here https://git-scm.com/downloads
Yup, I'm content with the default one though
What do you use, if any?
Fancy, polybar?
Only issue is the time is off by 4 minutes, and I use 24hr so it's kind of itching me
Traceback ```
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 352, in _run_event
await coro(*args, **kwargs)
File "D:\Discord Bots\JSON Formatter\main.py", line 21, in on_message
trade_side = ast.literal_eval(data["side"])
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\ast.py", line 108, in literal_eval
return _convert(node_or_string)
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\ast.py", line 107, in _convert
return _convert_signed_num(node)
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\ast.py", line 81, in _convert_signed_num
return _convert_num(node)
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\ast.py", line 72, in _convert_num
_raise_malformed_node(node)
File "C:\Users\schus\AppData\Local\Programs\Python\Python310\lib\ast.py", line 69, in _raise_malformed_node
raise ValueError(msg + f': {node!r}')
ValueError: malformed node or string on line 1: <ast.Name object at 0x000002B88283E110>
Code ```py
data = ast.literal_eval(message.content)
tps = ast.literal_eval(data["tps"])
trade_side = ast.literal_eval(data["side"])
Yea it's polybar, I ripped some config off github, got it copied in my dotfiles repo
if you're on windows and a 64 bit system, yes
Haha, I've been hung up about wanting to rice it myself without copying configs off github, but frankly it's too much effort and I might end up doing it
does someone know how to fix this type of issue?
by any chance?
this?
yup
I do recommend ricing yourself without copying other files. It's bespoke that way, you'll find it easier to use and navigate
The time investment will return you very well
I just have trouble with the icons honestly
I think icons would greatly improve how it looks
Don't even get me started on fonts
Yeah that's part of the problem
which ones
Dealing with fonts and polybar's configs is just... ugh
default is good
what the glitch i cant see that replied msg
If you wanna reduce bloat, take some time and tinker with it
All this rice talk makes me want to re-install arch from scratch
I'm feeling a bit bloated as well, got like 1000 some odd packages, before I only had 600
Gonna try my best to switch from BSPWM to xmonad as well
It's surprising how fast you forget how to install arch
Just switching from i3 to bspwm myself ๐
I've considered xmonad but the haskell configs are kind of scaring me
That's why I want to try it
Flex on my dotfiles repo that I use haskell
Without actually knowing haskell
Lmao, you've haskell experience?
๐
use windows?
Haha, not a language I see used often. Interesting though
Sure, that works
i feel like im downloading a virus lmao
If you feel that way, remember that Torvalds himself made git
Any lang that reminds me of lambda calc already gives me chills
I also know there is a haskell library for discord bots
crazy what you can do without OOP
Honestly I wouldn't be surprised if someone made a discord library in some obscene esoteric language
Well, to be fair brainfuck could work. It's turing complete
These days it seems like having a discord wrapper library is a pre-requisite to being recognizes as a language
So given enough time it'll work
Hell, you could probably even write a bot in x86_64
Probably, real question is do you want to
whats the install link again
I suppose it'd be a fun side project however, just for the silies
No way I would want to do that
after i installed git
Oh
the pip install
I tried taking my hand at some ASM when working on my "compiled" lang which I never finished
pip install git+https://github.com/Rapptz/discord.py.git
mostly cause I didn't understand ASM that well
Well there's no reason a compiler has to be written in ASM
didnt work again
what's the topic going on?
It was written in C++, It compiles to ASM then get's turned into binary
That was the plan at least
error?
I don't know... arch, ricing arch, discord libraries in weird languages
your daily dose of #discord-bots
vvvvvvvvv

That won't be really efficient.
ok

It's a toy lang, and my first one, although I never got it to work other than AST & lex
its working now
If I continued I would've made it bootstrap
do i have to uninstall smth
:D
Personally I'm trying my hand at creating a simple kernel using rust
no
I'm willing to bet it's the same one I'm following
The imports are included in the examples
so i dont need stuff like
from discord_components import DiscordComponents, ComponentsBot, Button, SelectOption, Select
Nope
why not use View?
You may as well uninstall discord_components so the interpreter throws an error if you do happen to be using it somewhere
intents = discord.Intents.default()
intents.x = True
bot = commands.Bot(command_prefix=",",intents=intents)```
@keen mural
Let's see the syntax then
import discord```
import discord
import os
import requests
import json
from discord.ext import commands
#from keep_alive import keep_alive
#from discord_components import DiscordComponents, ComponentsBot, Button, SelectOption, Select
import random
import asyncio
import datetime```
show ss