#discord-bots
1 messages · Page 223 of 1
nope
what nope
its not the path of my fie
so?
I'm saying you have to change it
ya but am asking abt url thing
url
please read the article
and keep attachment thing?
i did sir
everything is very clearly described there
.
bruh nothing is clear
To do so, upload the image normally with abc.Messageable.send(), and set the embed’s image URL to attachment://image.png, where image.png is the filename of the image you will send.
ic
i copied it exactly as it was written in the article
ya ic
sry
file = discord.File("C:\Users\Dell\Downloads\FotoJet(1).png", filename="FotoJet(1).png")
its showing error here
@vocal snow
k
@vocal snownow the whole command is not working oof
what?
.
Presumably it's ignoring an exception raised in on_message
heh?
do you know what an Exception is?
n
Doesn't seem like it
right, well I'm not going to be able to help you further
lol wait leeme find it
knowing python basics is an unfortunate prerequisite of discord.py
i actually know how it works but didnt knew the name sry
i really want to learn help sir
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
lots of free books and resources to learn basic python
i read it
i did read
a course on yt
That explains it
that would do it
heh?
hi guys what's up
what
its not general tho
hmm ur right my bad
help?
...
..
.
@slate swansay yes or no wen
with?
file = discord.File("C:\Users\Dell\Downloads\FotoJet(1).png", filename="FotoJet(1).png")
its showing error here
then show the error
i copy pasted
The error doesn't lie
copy pasted what
copy as path
try moving the image to your project directory and using relative path
ok
hello all, @limpid holly beware, he asks for money, pretends to code and then scams you
you might want to send this to @novel apex
u gave money?
lol
ic
how much?
30..
30 dollars?
bruhh
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. Various features of discord.py rely on having particular intents enabled, further detailed in its documentation. Since discord.py v2.0.0, it has become mandatory for developers to explicitly define the values of these intents in their code.
There are standard and privileged intents. To use privileged intents like Presences, Server Members, and Message Content, you have to first enable them in the Discord Developer Portal. In there, go to the Bot page of your application, scroll down to the Privileged Gateway Intents section, and enable the privileged intents that you need. Standard intents can be used without any changes in the developer portal.
Afterwards in your code, you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
# Enable all standard intents and message content
# (prefix commands generally require message content)
intents = Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see discord.py's related guide, and for general information about them, see the Discord developer documentation on intents.
see this
async def banner(ctx, Member: discord.Member):
banner_url = User.banner.url
if banner.url:
await ctx.send(User.banner.url)
else:
await ctx.send("This user does not have a banner.")```
could you help me
how much lines of code??
the whole thing?
your varriable is named Member not User
'-'
OH
ic
it still doesnt work :V
i changed member->User
show updated code
async def banner(ctx, User: discord.User):
banner_url = User.banner.url
if banner.url:
await ctx.send(User.banner.url)
else:
await ctx.send("This user does not have a banner.")```
okay first of all you define varriable banner_url right?
at first I did that
but then you dont use it you do something like banner.url which does not exist
. . .
use the varriable you defined
Ok wait
Ignoring exception in command banner:
Traceback (most recent call last):
File "/home/runner/FloralwhiteValuableStringweres/venv/lib/python3.10/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 81, in banner
banner_url = User.banner_url
AttributeError: 'Member' object has no attribute 'banner_url'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/runner/FloralwhiteValuableStringweres/venv/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/home/runner/FloralwhiteValuableStringweres/venv/lib/python3.10/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/runner/FloralwhiteValuableStringweres/venv/lib/python3.10/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Member' object has no attribute 'banner_url'
!paste
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.
!d discord.Member
class discord.Member```
Represents a Discord member to a [`Guild`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild "discord.Guild").
This implements a lot of the functionality of [`User`](https://discordpy.readthedocs.io/en/latest/api.html#discord.User "discord.User").
x == y Checks if two members are equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/latest/api.html#discord.User "discord.User") instances too.
x != y Checks if two members are not equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/latest/api.html#discord.User "discord.User") instances too.
hash(x) Returns the member’s hash.
str(x) Returns the member’s name with the discriminator.
you changed the wrong part
the User.banner.url is good
wha
but your if condition is wrong
async def banner(ctx, User: discord.User):
banner_url = User.banner_url
if banner.url:
await ctx.send(User.banner_url)
else:
await ctx.send("This user does not have a banner.")```
like this?
no i just said
User.banner.url is correct
but then in your if condition use varriable you define
u r using both bot and client why tho??
aaaaaa
read the error they even gave you a link to follow
async def banner(ctx, User: discord.User):
banner_url = User.banner.url
if User.banner_url:
await ctx.send(User.banner.url)
else:
await ctx.send("This user does not have a banner.")```
no
you define varriable banner_url not User.banner_url
no, not at all
nope
u are hopping on bot too early
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
read this ig
async def banner(ctx, User: discord.User):
banner_url = banner_url
if User.banner_url:
await ctx.send(User.banner.url)
else:
await ctx.send("This user does not have a banner.")```
yo like this??
may i ask you do you know basics of python?
if no the discord bot is not the best project for the first one
this question hurts allot
oh '-'
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
wht is tht basic knowledge??
here is explaination between the Bot and Client difference https://stackoverflow.com/questions/51234778/what-are-the-differences-between-bot-and-client
if u r thinking only knowing wht is int and str is enough then u r wrong
lol same here
learn pyhton
i know both python and c# and there is a lot between those 2 languages
ya lol
damn
@slate swanisnt this is how path looks like?
this is how path looks like but it does not mean the photo is at this location
but i copied it from there
from photo
they're both 2 different universes
thats what im sayin
No such file or directory: 'C:\Users\Dell\Downloads\FotoJet(1).png'
wht this tho
ya fax
means that there is no such file
bruh
that file doesn't exist
go into your downloads folder
and see for yourself
if it exists or not
lol worked
well then good for you
but now the embed not showing only picture is visible
down
....
@vague zephyris tht aki in ur pfp?
idk
heh?
my friends just told me to put it
i think it's from chainsaw man or something idk
ya
@slate swan
anyone help?
anyone help
What
my embed message is not been shown
becz i embeded an image
now tht image covered it whole
but commands are working
.
@slate swan
Ur token is none
Try printing it , will return none
any idea@slate swan??
Can u show ss?
of code?
Of what u get
i mean the embed
one sec
Already told you
async def test(self, inter, hey: Option(str, choices=['one', 'two', 'three'])):```
how can i provide some context to the options
@slate swanur code is diffrent then
Ur token is none bro
enter toke in client.run
💀
Don’t share token
What’s the issue
thats not how to use env varriables
.env (dotenv) files are a type of file commonly used for storing application secrets and variables, for example API tokens and URLs, although they may also be used for storing other configurable values. While they are commonly used for storing secrets, at a high level their purpose is to load environment variables into a program.
Dotenv files are especially suited for storing secrets as they are a key-value store in a file, which can be easily loaded in most programming languages and ignored by version control systems like Git with a single entry in a .gitignore file.
In python you can use dotenv files with the python-dotenv module from PyPI, which can be installed with pip install python-dotenv. To use dotenv files you'll first need a file called .env, with content such as the following:
TOKEN=a00418c85bff087b49f23923efe40aa5
Next, in your main Python file, you need to load the environment variables from the dotenv file you just created:
from dotenv import load_dotenv()
load_dotenv(".env")
The variables from the file have now been loaded into your programs environment, and you can access them using os.getenv() anywhere in your program, like this:
from os import getenv
my_token = getenv("TOKEN")
For further reading about tokens and secrets, please read this explanation.
He prob copied code from replit
there is a embed of strings but it is not being shown
by the image
i dont know env var either
U want text in image?
nope one sec
Ikr
it was supposed to be like this then the image at the end
wait am i supposed to use footer?
Ye..
ic
Try?
sry for wasting ur time
Nah im free lol
async def test(self, inter, hey: Option(str, choices=['one', 'two', 'three'])):```
how can i provide some context to the options
@slate swan
it's pycord
out of my reach sry
okey
can you not ping me whenever somebody needs help, thanks
Can u be a little brief .. im confused
sorry
really sorry
but caan i get hep pls?
?
help*
property footer```
Returns an `EmbedProxy` denoting the footer contents.
See [`set_footer()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed.set_footer "discord.Embed.set_footer") for possible values you can access.
If the attribute has no value then `None` is returned.
what do you need help with
use icon_url=
the embed image took the place of embed message
i want to add some description to the options
i dont understand
Resize it?
@slate swan
heh?
you want it as embed image ?
cause you pass it inside .send as file argument
also you override your embed creating a new one
that discord.file?
no when sending
file = file?
yes
i have to remove tht?
in docs it was given so i did
!d discord.abc.Messageable.send
await send(content=None, *, tts=False, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Sends a message to the destination with the content given.
The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.
To upload a single file, the `file` parameter should be used with a single [`File`](https://discordpy.readthedocs.io/en/latest/api.html#discord.File "discord.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.11)") of [`File`](https://discordpy.readthedocs.io/en/latest/api.html#discord.File "discord.File") objects. **Specifying both parameters will lead to an exception**.
To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed "discord.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.11)") of [`Embed`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
you pass file when you want to send image if you want to add it to embed you do embed.set_image()
i did it at up
in third last line
now its like this oof
ah sorry i made a mistake
the file=file was correct
ic
but then it will remain same again like tht so wht is wrong in the code??
you override embed
but tht redefined one is under comment na?
u mean by embed = discord.embed()
yes
??
ic
you straight copied it from the docs and dont know what it does to code
remove this line
lol
sry
Hey Guys
Is there any way, I can run this script (obviously with renamed variables and commands) multiple times? https://paste.pythondiscord.com/aninahoveq
For example.
I would like to run that script through my bot.
But what do I need to do, to run 2 or 3 of these scripts?
@slate swanbut the image is too big how can i make it small can i write code for like resize or smth??
the image size is determined by discord
but there are a few ways to attatch image to embed
image is the biggest one
huh?
you can use thumbnail but then it will be located on the top right
if i want it at bottom?
footer?
then you need to use image
footer will be just a small icon
as you see in image
i was using it right now with set_imgae
riight?
you can try changing size of image you have locally but i dont know if it will change something
yes
but its size is big
wait
i am sending one ss
how can i do like this??
..
wht is the * in the code?
in what code
set_thumbnail(*, url)
here?
and from where did you get it
docs
dont look at the definition look at params list below
heh?
params?
parameters?
yes
the * in this indicates that all parameters after are keyword only
@slate swan
like this
ig
so you cant do embed.set_thumbnail("some url") you need to do embed.set_thumbnail(url="some url")
what like this
image at the botum
yes and what about it
how can i do so cuz mine come really way to big and not in embed
no idea
ic
Hey, can you help me maybe with a question?
I got this script
https://paste.pythondiscord.com/aninahoveq
It has a feature that I would like to run multiple times through one bot.
I would like to have that feature maybe 3-4 times
am i allowed to ask a question about a bitcoin transaction confirmation checker?
how can i create collapsible messages?
wdym? do you mean ephemeral messages?
I mean
in the vast majority of cases yeah
wdym by that
wdym by that x2
!d discord.ext.tasks
!d discord
how can i make this image
!d discord.Embed.set_image
set_image(*, url)```
Sets the image for the embed content.
This function returns the class instance to allow for fluent-style chaining.
@young pendant
i did it it dont come under embed tho
probably didn't did that
.
i have used the set_image comand but in this code i wrote humbnail
.
u are confusing me
sry
how can i make my image come inside the embed like this?
this is mine
!d discord.Embed.set_image
set_image(*, url)```
Sets the image for the embed content.
This function returns the class instance to allow for fluent-style chaining.
embed.set_thumbnail(url="attachment://FotoJet(1).png")
embed.set_image(url="attachment://FotoJet(1).png")
?
i have to do this right?
try it and see
i did bro
i named it ight
thts its name
the output i get
@thin raftsry for disturbance
can u plss tell wht is kwarg
mmm didn't you have to put the full Path to the file instead of a name?
message.channel.send(file = file, ...)
discord.py doesn't support it
it will send the file :o
i did it bruh
wdym?
no you didn't, that's the filename that you setted in discord.File
sigh let me check disnake internals
hm, you know when you send a long code/message, discord automatically changes it into some sort of a file, that's what i meant
it c: thing there ig
you can't it's managed by Discord
I don't get it 
can't program it?
you have code snippets
i know bro thts hard for me tho
How, I never did that
i saw that site, but I'm to stupid to understand that
Then I think you should get better at python
dw it's a common thing, it also happened to me
message.channel.send(file = file, embed=embed)
u mean right?
..
name the file right first
the name of it in properties is its name right?
@thin raft
ic
yeah it should be this
try with attachment://yourfilepathhere
where?
but in docs it says path
oof
!d discord.Embed.set_image
set_image(*, url)```
Sets the image for the embed content.
This function returns the class instance to allow for fluent-style chaining.
path/to/my/image.png
ah then it should work
mm
bro u r god
lul it worked
it's like wondering why "9aghdpañowu0g`0.png" is written wrong
lol sry
nah dw
so r we not supposed to use number in .png??
ur suposed to name things right
ic
idk it always works fine for me
which database do u use??
sqlite or mysql depending on the project
depending on the project?
yeah but why it require the user to build the url manually when it could be done without much pain by the lib
means on wht factors it depend on
postgres >> :)
how big it needs to be and if I need more than 1 connection at a time
do u use reppel it to make ur bot online?
reppel?
replit
ic
not that
tacking on attachment:// you mean? i guess an is_attachment parameter would be fine, but if they automatically did it then you'd never be able to upload an attached image separate from the embed's image
though you can argue the other way around that its easy enough for the user to do it manually
await cembed.delete()
error: AttributeError: 'Embed' object has no attribute 'delete'
check this
me?
yeah
!d discord.Embed.delete
No documentation found for the requested symbol.
it is as the error says, perhaps you meant to call delete() on a message object instead?
!d discord.Embed
class discord.Embed(*, colour=None, color=None, title=None, type='rich', url=None, description=None, timestamp=None)```
Represents a Discord embed.
len(x) Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.
bool(b) Returns whether the embed has any data set.
New in version 2.0.
x == y Checks if two embeds are equal.
New in version 2.0...
i just want the embed to delete after something confirms
as in you have a message with an embed, and you want to only remove the embed?
mh? that's not true (I'm not sure if I understood what you're saying)
I'm saying why they let the user do
file = discord.File("hi", filename="lol")
embed.set_image("attachment://...")
when it could be
file = discord.File(...)
embed.set_image(file=file)
!d discord.Message.edit
await edit(*, content=..., embed=..., embeds=..., attachments=..., suppress=False, delete_after=None, allowed_mentions=..., view=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the message.
The content must be able to be transformed into a string via `str(content)`.
Changed in version 1.3: The `suppress` keyword-only parameter was added.
Changed in version 2.0: Edits are no longer in-place, the newly edited message is returned instead.
Changed in version 2.0: This function will now raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.11)") instead of `InvalidArgument`.
what does that do
will remove the embeds
that doesnt make any sense, embeds mean nothing to the discord API without them being associated with a message
message.delete
delete the message
feels a bit too tightly coupled of a feature to implement, but the syntax does look nice
I think it can't be implemented rn in d.py
it requires some discord.Embed and discord.File rewrite
and it should be edited for other things too, to be consistent
this is how it's actually implemented in disnake
does it? i would imagine storing the files as an attribute of embed then having the send() method extract those files to be uploaded
by coupling i just mean that an embed is basically a JSON object with some string values so it doesnt make sense to make it responsible for file objects
I think this would have been possible if Discord.py didn't handled files so strangely
oh sure enough disnake does the same thing i described
https://github.com/DisnakeDev/disnake/blob/master/disnake/embeds.py#L828-L832
https://github.com/DisnakeDev/disnake/blob/master/disnake/abc.py#L1599-L1602
disnake/embeds.py lines 828 to 832
if file:
if file.filename is None:
raise TypeError("File must have a filename")
self._files[key] = file
return f"attachment://{file.filename}"```
`disnake/abc.py` lines 1599 to 1602
```py
for embed in embeds:
if embed._files:
files = files or []
files.extend(embed._files.values())```
how so? whats different between it and disnake
ah you meant this thing
How can I make this task to start every third day at 00:00 am?
@tasks.loop(hours=24 * 3)
async def update_elo_ratings():```
import datetime
from discord.ext import commands, tasks
utc = datetime.timezone.utc
# If no tzinfo is given then UTC is assumed.
times = [
datetime.time(hour=8, tzinfo=utc),
datetime.time(hour=12, minute=30, tzinfo=utc),
datetime.time(hour=16, minute=40, second=30, tzinfo=utc)
]
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.my_task.start()
def cog_unload(self):
self.my_task.cancel()
@tasks.loop(time=times)
async def my_task(self):
print("My task is running!")```
Can't I just do this?
@tasks.loop(hours=24*3, start_time=datetime.time(hour=0))```
use before_loop and sleep until 12am
where did you get start_time
afterwards dpy will keep it synced to the correct interval
So this won't work as well?
@tasks.loop(hours=24*3, start_time=datetime.time(hour=0))```
does anyone know if the current discord.py functionality supports publishing an embed?
if so does anyone have any examples of an idea of how that would work following the
await channel.send(embed=embed)
publishing an embed?
For some reason cannot get it to work
yeah, the publish function in an announcements channel
!d discord.Message.publish
await publish()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Publishes this message to the channel’s followers.
The message must have been sent in a news channel. You must have [`send_messages`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.send_messages "discord.Permissions.send_messages") to do this.
If the message is not your own then [`manage_messages`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") is also needed.
since when is that smt
store the message object returned by send() and you can call publish() on it
Can you give me an example of this please?
oh thats not too bad
@tasks.loop(hours=24 * 3)
async def my_loop():
...
@my_loop.before_loop
async def before_my_loop():
await asyncio.sleep(<seconds_until_12am>)``` as for calculating the seconds, figure out the next due date then subtract the current time (datetime is probably the easiest to use for this)
i am struggling a bit because its an embed and I am still getting used to those a bit.
how would I store the object in this case?
send() returns a Message object, by storing it i mean assigning the result to a variable so you can do things with that message object
message = await ctx.send("Hello...")
await message.edit(content="...world!")```
ohhhhhhhh ok, and in this case publish is an attribute of message so I should be able to just put it as
await message.publish()
right?
yup
In response to that its throwing me this
code I have is
channel = self.bot.get_channel(int(dest.content))
message = await channel.message.send(embed=embed)
await message.publish()
yeah what the error says, channel.message doesnt exist
message.channel.send
or channel.send in your case
okok
asking so I know for next time, still learning a lot of this.
appreciate the help.
if it was working earlier, i dont think that code was what your bot was running
Can't I just do something simple as:
# Set the desired start time
start_time = datetime.time(hour=0)
@tasks.loop(hours=24 * 3, time=start_time)
async def update_elo_ratings():
# Code here```
have you tried it? you'll see your answer
(its also answered in the docs)
i still have my doubts about that because its like if a person said "spiders have 2 legs" and then they showed a picture of a spider with two legs
the picture affirms their statement, but you know it objectively doesnt make any sense
what "message" could channel.message possibly refer to? there's thousands to choose from
that being said i dont know enough about how the bot reacted for me to make any clear judgement, but my assumption would be something more simple like accidentally changing the original channel.send() to channel.message.send(), then forgetting to save until the publish() line was added
that is entirely possible in fairness, but i dont believe i had edited that line in a while. who knows, regardless the solution provided did help, thank you 🙂
ALLOWED_ROLES = (893639927928062032, 159107041896562688, 712725199161786429, 759773665575043073, 829569153136066572,)
bot.add_check(lambda ctx:
any([r in ctx.author._roles for r in ALLOWED_ROLES]))
is this not the right format for limiting what roles it uses? I thought it was working fine but seems to be acting up now and allowing anyone to use it
Hello,
In a slash command i have an argument to input a discord.Role but it only allows the user to enter one role
How can i allow the user to input 5 optional roles (They must at least input 1 role and 5 is the max they can input)
you can have multiple arguments for the different roles, but besides that there's not much else you can do
Maybe u can use a view with 5 select menus :P
or just 1 and have a maximum selection of 5 🤷
Try removing the comma after the last role, and remember you are using role ids and not objects. Also change the any() statement to any(role.id in allowed_roles for role in ctx.author.roles) hope this helps 🙂
Do you want there to be five individual inputs? One way I like to do this is by just making the singular option a string and having users mention the roles they want, and separate them by commas. Then you can use python’s built in split() function.
Can any1 help me with the skycrypt api/hypixel api and how to retrieve info and convert it from a list to just the data dm me plz
this is not related to discord bots
Yes it is
just because it involves a discord bot doesn't mean you should post it here because not everyone works with the hypixel api
Hey @slate swan!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
have you tried seeing what user_answer is?
If I wanted to have a command cancelled based on a specific response from an if statement, is it "exit" that would be used? Or something else
Like if I used "next" but instead wanted it to just stop the command entirely
exit isn't working is why im asking
i forgot how to do it - how do i change the direction of the selection options once clicked? because once i click it, it goes down.
return??
thought that could only be used in a loop??
no that's what continue/break is for
ohhh
got them flipped then
appreciate you
thats not doing it
getting the code
await ctx.send(embed=embed)
await ctx.send(f"Tagging @{role_message}.")
await ctx.send(f"Sending to #${dest}.")
await ctx.send('**Last Chance**, does all this look correct? Yes or No.')
confirmation_message = await self.bot.wait_for("message", check=lambda m: check(m) and any([
"yes" in m.content.lower(),
"no" in m.content.lower()
]))
if "yes" in confirmation_message.content.lower():
next
if "no" in confirmation_message.content.lower():
await ctx.send("The embed has been succesfully cancelled, please try again.")
return
it seems to be ignoring return?
next(iterator)``````py
next(iterator, default)```
Retrieve the next item from the [iterator](https://docs.python.org/3/glossary.html#term-iterator) by calling its [`__next__()`](https://docs.python.org/3/library/stdtypes.html#iterator.__next__ "iterator.__next__") method. If *default* is given, it is returned if the iterator is exhausted, otherwise [`StopIteration`](https://docs.python.org/3/library/exceptions.html#StopIteration "StopIteration") is raised.
this is probably not what you wanted
I thought next is what I would use to move on in the command
uhhh
nowhere just taking my own stab at writing my own if statement lol
clearly its going well
does anybody knows?
if i do
from FILE_NAME import FUNCTION can i just use that command from the main file? or do i have to run the other one or sum
guys now i want create a file in a folder that the running file of python run in.
and ofc with os.listdir()
In Python it's possible to attach an else clause to a for loop. The code under the else block will be run when the iterable is exhausted (there are no more items to iterate over). Code within the else block will not run if the loop is broken out using break.
Here's an example of its usage:
numbers = [1, 3, 5, 7, 9, 11]
for number in numbers:
if number % 2 == 0:
print(f"Found an even number: {number}")
break
print(f"{number} is odd.")
else:
print("All numbers are odd. How odd.")
Try running this example but with an even number in the list, see how the output changes as you do so.
hi I was trying to sync new slash command I made to a specific test guild but the commands I synced before made shows up twice in the test guild if I specify the guild when using tree.sync. Not sure what I have to do here
so I think I solved this issue now 😅
hey I have a question
if I want to prevent people with Discord roles that are too low from using a certain bot command, how do I do that
how do I use this bot
await interaction.edit_original_response(content="Audio downloaded successfully.", file=discord.File('./audio.mp4'))```
is my code, and I am getting an error that edit_original_response does not have a "file" argument
bruhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
!d discord.Interaction
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.
Not clearly specified what you need, however here are 2 possible solutions
- If you want to restrict users with roles or your bot is multiserver with different configured roles, you need to use custom check (see
@commands.checkin docs) - If your bot is single guild and you want users only with certain roles to be allowed to use command, use
@commands.has_rolesor@commands.has_any_role.
!d discord.Interaction.edit_original_response
await edit_original_response(*, content=..., embeds=..., embed=..., attachments=..., view=..., allowed_mentions=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the original interaction response message.
This is a lower level interface to [`InteractionMessage.edit()`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.InteractionMessage.edit "discord.InteractionMessage.edit") in case you do not want to fetch the message and save an HTTP request.
This method is also the only way to edit the original message if the message sent was ephemeral.
!d discord.Attachment
@vale wing can you just help me with my problem pls
I know there are multiple things that I am doing wrong here
but I don't know how to fix them
attachments=[discord.File("./audio.mp4")]
could you not just look at the docs to see all the arguments
i am creating a discord command to repeat what i say, the command is returning a error
the command
`import bot
@bot.command()
async def say(ctx, , arg):
await ctx.send(f"{arg}/n)"
"* **/n"
f"{ctx.author.mention}/n")
if name == 'main':
bot.run_discord_bot()`
The error it is giving me
AttributeError: module 'bot' has no attribute 'command'
Can someone tell me how i could fix this issue?
im extremely new to coding, lol.
I would really recommend learning some basic python first; it looks like you're just gluing together random code
you need to import discord.py first, then create a bot instance and register commands using it
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Bunch of free courses and books here
ty
e.g. ```py
from discord.ext import commands
import discord
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(
intents=intents,
command_prefix="!"
)
@bot.command()
async def my_command(ctx):
...
@smoky sinew pls help
currently opencv or cv2 whatever u say doesnt work on replit
any tips on how to learn discord bot python?
Are you comfortable with basic python and some indermediate python like classes?
f..
then it won't run @shrewd fjord ?
Did you save the file? Can u show the full code
:incoming_envelope: :ok_hand: applied timeout to @patent lark until <t:1680586269:f> (10 minutes) (reason: newlines rule: sent 12 consecutive newlines in 10s).
The <@&831776746206265384> have been alerted for review.
!unmute 647261111841980418
:incoming_envelope: :ok_hand: pardoned infraction timeout for @patent lark.
For longer code snippets please use a paste site
otherwise our bot will mistake you for a spammer
got it
nope
it doesnt?
I think it did before
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
anyone?
Have you saved the file?
actually i am totally not sure about now, but like about 6 months ago it didnt work for me
send code
ya
out of my reach
oh np
lol am making it as well somehow
for karuta ?
n
am u supposed to code in sql as well?
Yeah unless it's non-sql database like mongo
am supposed to learn sql as well then??
can someone help me with it
is anyone here i need help
even i need help :/
Don't ask to ask, just ask
how do i do a fricken button 😦
i have been trying for 3 hours now
import discord
from discord.ext import commands, tasks
from discord.ext.commands import Bot, Context
from discord.ui import Button
intents = discord.Intents.all()
intents.bans = True
intents.dm_messages = True
intents.dm_reactions = True
intents.dm_typing = True
intents.emojis = True
intents.emojis_and_stickers = True
intents.guild_messages = True
intents.guild_reactions = True
intents.guild_scheduled_events = True
intents.guild_typing = True
intents.guilds = True
intents.integrations = True
intents.invites = True
intents.messages = True # `message_content` is required to get the content of the messages
intents.reactions = True
intents.typing = True
intents.voice_states = True
intents.webhooks = True
intents.members = True
intents.message_content = True
intents.presences = True
prefix = "."
bot = commands.Bot(command_prefix=prefix,intents=intents, description="Desc", help_command=None)
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name=f"{prefix}help"))
print("Bot has successfully logged in as: {}".format(bot.user))
print("Bot ID: {}\n".format(bot.user.id))
@bot.event
async def on_message(message: discord.Message) -> None:
if message.content == ".button":
view = discord.ui.View()
button = discord.ui.Button(label="Click me!")
view.add_item(button)
await message.channel.send("Hello!", view=view)
def check(m):
return m.channel == message.channel
try:
interaction = await bot.wait_for("button_click", check=check, timeout=30)
await interaction.response.send_message("You clicked the button!")
except asyncio.TimeoutError:
await message.channel.send("You didn't click the button in time!")
bot.run(token="token")
it spawns the button and will get the timeout error and send the msg but it wont get if i click the button
my guy
discord.Intents.all() should be fine, you don't need to manually enable all of them
for the button, you must create a callback function for it to do anything when pressed
I will demonstrate 1 in a class (for more complicated stuff) and one inside a command
class CustomButton(discord.ui.Button):
def __init__(self):
super().__init__(style=discord.ButtonStyle.red, label="LABEL")
async def callback(self, interaction: discord.Interaction):
await interaction.response.edit_message("you pressed the button!")
class CustomView(discord.ui.View):
def __init__(self):
self.add_item(CustomButton(0, 0))
then in your command, just add view=CustomView() when you send it
I just yoinked some of my code from me making a game if ur wondering about the variables
and here is a button made INSIDE a command:
(this was inside a cog)
I heavily recommend NOT defining the buttons inside a command as you are unabke to use them in different commands and it is less efficient overall.
@slate swan
normal imports ???
if you are using my recommended method of using classes, you will need from discord.ui import Button, View
no wait you dont
it calls from the discord library
my bad @slate swan
Sorry for interrupting a convo, just wanted to know if slash commands are exclusive to the client side of discord.py, and if not how can I use them with cogs?
wdym by client side
a bot cannot interact with other bots if that's what ur wondering
Meant to say @client.event thingy (I'm sorry I don't know how this is called)
My bot uses @bot.event for reference
Not this
to make a slash command?
those are slash commands, or what discord.py calls app_commands
to make them in your main.py file (not a cog), do @bot.tree.command(args) , and in cogs, do @app_commands.command(args) where you usually put @commands.command()
its its not to much effort could you quickly do a small example of a button and the interaction within the button ?
just like a simple "button pressed"
this should work fine
as an example
So if I were to have this
class CommandHandler(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name='test')
async def test_command(self, ctx):
"""Says hello"""
await ctx.send('Hello!')```
It'd be this?
```python
class CommandHandler(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command(name='test')
async def test_command(self, ctx):
"""Says hello"""
await ctx.send('Hello!')```
buttons are interactions, so they don't take context (ctx)
interaction: discord.Interaction
instead of ctx: discord.Context
async def on_message(message: discord.Message) -> None:
if message.content == ".button":
button = CustomButton()
await message.reply("this is a button", view=button)
how do i do this 😦
same thingwith slash commands
im using the class
why are you making commands with on message
You don't
im just testig
Use commands framework
And for buttons check examples on repo
If you need links tell me
how did u first learn discord.py?
Best is disnake! (in my honest opinion)
can you provide a link to the example of the discord button example ?
Objects of type module do not support > comparison 
MY BAD
First I copied stuff from random site "how to make discord bot" then docs and this channel
I didn't even know OOP when I started
Bot development was a great entrypoint for me
how is that not int
It's too big for discord default integer type
should i use str ?
Iirc you can somehow increase the limit but I am not sure and can't tell you how exactly
str will work but that method might be better
What library do you use?
I dont see i docs the type for snowflake or bigger int
pycord, i achieved it with string. but now i have to check it it's a valid id
I just remember disnake having that in comnands.Param, apparently it serialises as string but lib converts to integer
!d disnake.ext.commands.Param
disnake.ext.commands.Param(default=Ellipsis, *, name=None, description=None, choices=None, converter=None, convert_defaults=False, autocomplete=None, channel_types=None, lt=None, ...)```
A special function that creates an instance of [`ParamInfo`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.ParamInfo "disnake.ext.commands.ParamInfo") that contains some information about a slash command option. This instance should be assigned to a parameter of a function representing your slash command.
See [Parameters](https://docs.disnake.dev/en/latest/ext/commands/slash_commands.html#param-syntax) for more info.
There's large kwarg
Ah okay so not at discord side
it worked, thanks
don't, discord.py has slash command support now
!d discord.app_commands.CommandTree
class discord.app_commands.CommandTree(client, *, fallback_to_global=True)```
Represents a container that holds application command information.
Alr ty
Anyone know how can I add an optional param in slash commands
you give it a default value the same way you would with a regular function
how do I get bot uptime?
Start a time variable in on_ready and substract it from the time when the command for uptime is sent
u meant to save a variable on the on_ready and subtract it from the command sent time?
or if you want to be a bit more fancy, store a list of timespans of when your bot is online
I am ok with relative time
datetime + bot vars would be most convenient for implementing either option
having a bit of trouble with an if statement seeing if anyone can steer me in the right direction....
await ctx.send(embed=embed)
await ctx.send('Does this look correct? Yes or no.')
confirmation_message = await self.bot.wait_for("message", check=lambda m: check(m) and any([
"yes" in m.content.lower(),
"no" in m.content.lower()
]))
if "yes" in confirmation_message.content.lower():
next
if "no" in confirmation_message.content.lower():
await ctx.send("The embed has been succesfully cancelled, please try again.")
exit
it accepts both yes and no but if you say no it still says it cancelled the embed but it continues on with the rest of the command.
For context this is inside of a multi step embed command where the user sets the individual parts of the embed by responding to the bot. Everything works except for this loop part so I know its just my if statement thats messed up
it still sends the "the embed has been succesfully cancelled, please try again" but doesnt exit the command
next and exit are just functions, both of which you likely dont want to call
generally an exception or return statement is how you'd terminate a function early
how do I access the variable that saves the bot uptime time from the on_ready?
is it possible to dm someone with components?
I could leave the "yes" lines the way they are and just modify the "no" lines, yes?
thats what the bot var is for: ```py
bot.last_connected = None
@bot.event
async def on_connect():
bot.last_connected = datetime.datetime.now()
@bot.command()
async def uptime(ctx):
# calculate here using bot.last_connected```
oh thank you. I didnt read your message clearly
i guess sure, or you can remove the yes entirely - if its not no then you know its a yes
Oh and it'll just move on in response to yes because of the check
that makes sense
that fixed it 🙂
also, confused on what I am doing wrong in this code bit py await ctx.send(f"Sending to: <#${dest}>.")
that its outputting it as this
Sending to: <#$<Message id=1092811984937943172 channel=<TextChannel id=1065685023853920258 name='bot-testing-zone' position=7 nsfw=False news=False category_id=1065685023853920256> type=<MessageType.default: 0> author=<Member id=288522211164160010 name='ian' discriminator='5555' bot=False nick=None guild=<Guild id=1065685023283499118 name="Ian's Workshop" shard_id=0 chunked=True member_count=7>> flags=<MessageFlags value=0>>>.
I know I have gotten this to work before and from my research that is the right format for that, I just cant figure it out
"dest" being a channel ID
well apparently dest is a message object
if you want to mention the channel of that message you'd use <#{message.channel.id}> (no $ sign), or the convenient property {message.channel.mention}
So that makes sense but how would I convert the "dest" object over to "message.channel.id"? just using an "=" statement above?
dest is your message, so to access its channel you would write dest.channel
i mean if you want to alias it (set it to a variable) before writing your f-string sure
but you're free to write the entire expression within your f-string
doing dest.channel is just saying the channel the command is being used in, not what dest actually is which is the announcements channel its going to
then do you have the channel object for that announcement channel?
Unsure how to answer that tbh
await ctx.send('What channel should I send this in? Please provide me with the channel ID.\n- #sc-news: 569635458183856149\n- #general-news: 803341100618219540\n- #sc-patch-notes: 585952222853201941')
dest = await self.bot.wait_for('message', check=check)
this is how I'm getting announcement channel id
oh thats you meant by "dest being a channel ID", the message content contains the actual ID
imo this is what you want to use a channel select menu for, but regardless you'll want to get the channel object using that ID
!d discord.Guild.get_channel
get_channel(channel_id, /)```
Returns a channel with the given ID.
Note
This does *not* search for threads.
Changed in version 2.0: `channel_id` parameter is now positional-only.
Hey if I knew how to make a channel select menu right now I'd do it, but thats a project for another day.
So I could instead do get_channel(dest, /)
and then use the channel.id I get from that for the await.send()?
remember that dest is a Message object, not a string
Use the channel you get from that
thats why you got this messy output earlier, you didnt reference the actual content of that message
Not the channel.id
that part definitely stumps me a bit, trying to either turn it to a string or access the content
ah ok good note ty
@blissful badgehi
hello
there are several different data types you'll need to work with to work towards sending that announcement: ```py
message = await bot.wait_for("message", ...)
^ Message object
message.content
^ a string, which presumably looks like '569635458183856149'
int(message.content)
^ an integer, which would look like 569635458183856149
channel = ctx.guild.get_channel(int(message.content))
| ^ the current guild
= the GuildChannel object that would be your #sc-news channel
(or possibly None)
await channel.send(f"This is an announcement to {channel.mention}")
#sc-news```
thats right "int"
mudkip has been reminding me of that so much
ok ty cracks lemme try to implement that
huh?
?
can i ask which type of bot u r trying to make
Well its actually already made, just tinkering with some features but...its an embed bot
like carl bot ig its the name
Is it possible to edit a embed with a button click
e.g. after a button click your name shows up in the embed?
bruh
do u have a server for ur bot?
similar functions i think to its embed functions yeah
its in a test server yeah but its mostly used in the r/starcitizen discord
ic
Hello, when I want to put my bot online I have this problem that appears ... possible to help me solve it? thank you in advance
@hushed galleon I actually got it to do exactly what I wanted with just this line
await ctx.send(f"Sending to: <#{dest.content}>.")
ignore additional screenshot
which is weird because it knows what "dest" is, but then when I try to do
await ctx.send(f"Tagging: <@&{role_message}>.")
it doesn't know what "role_message" is
"role_message" just being another identifier like "dest"
If the message content is a channel ID, then it will
yeah which it is, so to me it makes sense that it works
just from what cracks said it seemed like it needed more
so just clarifying
it couldnt find relay_bot module show your file tree
broo can u tell should i make diffrent files for diffrent types of code?
yes, but on my site I can't add a folder, so I took out the relay of the folder, that's why? but then I have to mark what in the .main file?@slate swan
like for strt commands diffrent
like groups of commands in a different file?
I would recommend doing so using cogs and extensions yeah
ya but..
bruh cogs and extenions?
i openmain.py and i whrite just "import relay" ?
i am doing in vs code
ok
Its a lot easier then it seems.
Here is an example cog file
import discord
from discord.ext import commands
class Responses(commands.Cog):
def __init__(self, bot):
self.bot = bot
self._last_member = None
@commands.Cog.listener()
async def on_message(self, message: discord.Message) -> None:
if self.bot.user.mentioned_in(message):
print("SCNewsBot has been mentioned.")
await message.channel.send("test")
@commands.command(name='commands')
async def send_data(self, ctx):
await ctx.send("test")
channel = self.bot.get_channel(1086293466054656100)
author = ctx.author.name
await channel.send(f"Command list access by {author}")
@commands.command()
async def ping(self, ctx):
await ctx.send("Hello! I am here.")
async def setup(bot):
await bot.add_cog(Responses(bot))
from os import environ as env
from dotenv import load_dotenv
from relay_bot import RelayBot
load_dotenv()
def main():
relay_bot = RelayBot(
env.get('SOURCE_CHANNEL_ID'),
(
env.get('PRIORITY_DESTINATION_CHANNEL_ID'),
env.get('FALLBACK_DESTINATION_CHANNEL_ID')
),
env.get('ROLE_ID')
)
relay_bot.run(env.get('BOT_TOKEN'))
if name == 'main':
main()
this is my main.py
and then here is what you need in your main file to import a cog
extensions = ("embed","responses","formats")
is there any docs for cogs??
yes let me grab it
bruhhhhh
@slate swan 'from os import environ as env
from dotenv import load_dotenv
from relay_bot import RelayBot
load_dotenv()
def main():
relay_bot = RelayBot(
env.get('SOURCE_CHANNEL_ID'),
(
env.get('PRIORITY_DESTINATION_CHANNEL_ID'),
env.get('FALLBACK_DESTINATION_CHANNEL_ID')
),
env.get('ROLE_ID')
)
relay_bot.run(env.get('BOT_TOKEN'))
if name == 'main':
main()'
ty
??
since I took my relay file out of the folder I have to write at the top of the hand ? just import relay ?@slate swan
load an extension* example extension file*
remember they're not the same
huh?
extensions can be loaded without any cogs, and cogs can be added without being in an extension
this is all thats in my main file for my extensions
ohhhh
ur correcting my terminology
thank you
any idea why this is working
await ctx.send(f"Sending to: <#{dest.content}>.")
dest being defined earlier in the code
but this isn't working
await ctx.send(f"Tagging: <@&{role_message.content}>.")
it says discord.ext.commands.errors.CommandInvokeError: Command raised an exception: UnboundLocalError: cannot access local variable 'role_message' where it is not associated with a value
code?
yesssssss one second
Hey @blissful badge!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
what when this if is False if "yes" in tag_confirmation.content.lower():? then the varriable role_message wont be defined
and you encounter this error
why are you using the next thing again
cause you need to do something when this if is True
I do
you cant just define if something and do nothing
oh
outside of defining I have to do something
but theres nothing else i need it to do lol
What?
if you dont need this if remove it
you just return
but I thought return stops it?
delete the whole if "yes" part
which one did you want
this isn't for the preview
then remove the if statement entirely for if "no"
await ctx.send('Do I need to tag someone? Yes for single post or final in a set, no for first if you need a second embed.')
#role_message = await self.bot.wait_for('message', check=check)
tag_confirmation = await self.bot.wait_for("message", check=lambda m: check(m) and any([
"yes" in m.content.lower(),
"no" in m.content.lower()
]))
if "yes" in tag_confirmation.content.lower():
await ctx.send('What role should I tag? Please provide me with the role ID.\n- scnews: 620025828079697920\n- gennews: 803343410794594385\n- patchnotes: 620025894559547412')
role_message = await self.bot.wait_for('message', check=check)
whototag = role_message
await ctx.send('What is the tag preview?')
tag_preview = await self.bot.wait_for('message', check=check)
if "no" in tag_confirmation.content.lower():
ah ok
thats kinda where i was getting cause cracks and I talked about something similer earlier
ok so here is where that issue is presenting itself again which @slate swan you pointed out earlier
for this section that pulls said "role_message" if I say no to needing to tag anyone it fails cause role_message has no content to it
await ctx.send(f"Tagging: <@&{role_message.content}>.")
so trying to figure out how to get it to not error out the whole command if I say no to the earlier question that defines role_message
just send the tag in the if statement
you should really use a converter instead of manually tagging the id
but it needs to be sent later.
it gets defined early on, but then gets sent again during the preview of the embed before it gets sent
So I can't send it in the if statement
sorry just proud of myself, i fixed it myself with an if statement on the first try!!!!
mh yes math
@bot.event
async def on_message(message):
if message.channel.type == discord.ChannelType.news:
await message.publish()
return
having some issues making this instead work with specific channels vs ALL news channels.
I've tried the usual things like calling out the channel and publishing any messages in the channels but its not doing it.
any ideas?
hello, i am doing a custom timezone command and i need help converting an UTC offset to a timezone name with whatever lib, i tried searching online for some results but none worked for me
astimezone(datetime.timezone.utc)
error:
AttributeError: type object 'datetime.datetime' has no attribute 'timezone'
!d datetime.timezone
class datetime.timezone(offset, name=None)```
The *offset* argument must be specified as a [`timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta "datetime.timedelta") object representing the difference between the local time and UTC. It must be strictly between `-timedelta(hours=24)` and `timedelta(hours=24)`, otherwise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "ValueError") is raised.
The *name* argument is optional. If specified it must be a string that will be used as the value returned by the [`datetime.tzname()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.tzname "datetime.datetime.tzname") method.
New in version 3.2.
Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
not datetime.datetime.timezone
huh?
you're using from datetime import datetime in your code
yea
that's the problem
do i just need import datetime?
yes, and switch the rest of your code to use datetime.datetime instead
im using an api to get when something confirmed, but it returns the time as 2023-04-04 02:28:25+00:00 is there anyway i can make this more readable/look nicer?
confirm_time = datetime.strptime(res["confirmed"], "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=pytz.utc)
like this?
!d discord.utils.format_dt
discord.utils.format_dt(dt, /, style=None)```
A helper function to format a [`datetime.datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "(in Python v3.11)") for presentation within Discord.
This allows for a locale-independent way of presenting data using Discord specific Markdown...
<t:1680630195:f>
yea
or just use a nicer format in strptime
you can use the util mentioned above
im not really sure how i'd implement it within my code?
nicely_formatted_date = discord.utils.format_dt(<your_datetime_object>)
that would be doing it manually, that's why you want to use a util...
that does it FOR YOU
by giving it a datetime object, it "converts" it into discord's sexy format
ohh
confirm_time = datetime.strptime(res["confirmed"], "%Y-%m-%dT%H:%M:%SZ")
nicely_formatted_date = discord.utils.format_dt(confirm_time)```
like that?
looks good to me, now you can choose a style too (via the style parameter)
<t:1680630573:f>
<t:1680630573:F>
<t:1680630573:R>
check the docs what options you can pick from
.
style = <t:{confirm_time}:F> ?
doesnt work for me, i spend to long trying to find a solution, im just gonna use unix timestamps now
anyways why is the the hex code 0xfff shown as blue in an embed?
that worked tysm
gl!
what?
link is your answer
i asked why 0xfff is shown as blue because originally its white
i didnt even use ansi
Guys I want to mirror a telegram channel into discord. How would I do it without being an admin ?
