#discord-bots
1 messages Β· Page 890 of 1
Oh
Youβd probably already pass lmfao they wonβt even bother to look at the paper
how do i check if an channel has a slowmode on
!d discord.TextChannel.slowmode_delay
The number of seconds a member must wait between sending messages in this channel. A value of 0 denotes that it is disabled. Bots and users with manage_channels or manage_messages bypass slowmode.
it is possible to create a command thats set a cooldown in a channel ?
!d discord.TextChannel.edit
await edit(*, reason=None, **options)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the channel.
You must have the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to use this.
Changed in version 1.3: The `overwrites` keyword-only parameter was added.
Changed in version 1.4: The `type` keyword-only parameter was added.
Changed in version 2.0: Edits are no longer in-place, the newly edited channel is returned instead.
slowmode_delay=int
im getting this error in heroku when i run my bot -
2022-03-07T19:48:17.810108+00:00 heroku[web.1]: Stopping process with SIGKILL
2022-03-07T19:48:18.018470+00:00 heroku[web.1]: Process exited with status 137
2022-03-07T19:48:18.062536+00:00 heroku[web.1]: State changed from starting to crashed
2022-03-07T19:53:47.561616+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=defnotbot.herokuapp.com request_id=4d02ed77-300b-4758-9b24-8ad0b3ad71b6 fwd="142.116.71.188" dyno= connect= service= status=503 bytes= protocol=https
2022-03-07T19:53:48.512361+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=defnotbot.herokuapp.com request_id=b478e0d3-980e-4f90-a67d-7e6c04f23ddb fwd="142.116.71.188" dyno= connect= service= status=503 bytes= protocol=https```
int
i corrected it before you said that π
Having difficulty getting my aioHTTP to connect to my Docker-Compose containerized FastAPI server -
for example:
async def send_single_update(self, json_out):
headers = {'content-type': 'application/json'}
async with aiohttp.ClientSession() as session:
url = await session.post(f"http://barbotapi:8000/single", json=json_out, headers=headers)
list_from_url = await url.json()
return list_from_url
Error output with my custom handler:
barbot | Oof! Looks like we encountered an error: Command raised an exception: ClientConnectorError: Cannot connect to host localhost:8000 ssl:default [Connect call failed ('127.0.0.1', 8000)]
Am I misunderstanding how to specify hostname? Upon reviewing it does seem a possibility, any ideas? β€οΈ
Is your bot on the same network
@commands.command()
async def resume(self, ctx):
client = ctx.guild.voice_client
if client.is_paused():
client.resume()
await message.add_reaction("π")
``` someone know why my reaction don't work ? no error
Since the connect call should be on an internal network not loopback
Yeah, I made a custom network in docker-compose for that
Who can help with postgresql ( heroku/git )
One questionz why my bot dont send the embed
This is my code
@client.command()
async def expulsar(ctx, member:discord.Member, *, reason=None):
embed = discord.Embed(title = 'Expulso', description = f' o membro {member.mention} foi expulso!')
await member.kick(reason = reason)
await ctx.send(embed=embed)
from docker-compose:
networks:
barhub_network:
driver: bridge
each is on barhub_network
Is that really the code that's causing the error
There's no line numbers
Ctrl shift f and search localhost, maybe, don't know
error ?
Hey guys. Question about using python to script discord bots. How do I make it so the bot reply mentions the discord user? For example-> if person with discord name "@ user123" says "hello" the bot will respond by saying "@ user123, hello"
The bot responds when it should, I just want it to mention the user in the reply, so they are alerted
It is handled internally, I could disable the handler for the time being and see if it yields any useful information
No, it kicks the member out but doesn't send the embed
english pls
Ye sorry
As a side note I always log the tracebacked error in debug
I donΒ΄t see the linguage
Who can help with postgresql ( heroku/git )
Ask your question
so there are only two methods involved in this command -
@commands.command(name='single_update', help='update api server')
async def single_update(self, ctx, setting: str, value=None):
print('initial single')
check = self.updater_dict.get(setting)
print('entering single update')
if check:
try:
print('entering try')
value = await check(self, ctx, value)
except:
await ctx.send("Incompatible value!")
else:
if value:
print('had value')
json_out = {
"server_id": ctx.guild.id,
setting: value
}
response = await self.send_single_update(json.dumps(json_out))
await ctx.send(f"**{setting}** successfully changed to **{value}**")
else:
await ctx.send("Bad Value!")
else:
await ctx.send('Not a recognized setting!')
async def send_single_update(self, json_out):
headers = {'content-type': 'application/json'}
async with aiohttp.ClientSession() as session:
url = await session.post(f"http://barbotapi:8000/single", json=json_out, headers=headers)
list_from_url = await url.json()
return list_from_url
@floral rune try this python @client.command() async def expulsar(ctx, member:discord.Member, *, reason=None): embed = discord.Embed(title = 'Expulso', description = f' o membro {member.mention} foi expulso!', color = 0x235370) await member.kick(reason = reason) await ctx.send(embed=embed)
Ok
I put in those print statements for debug/testing and none are actually printing
ItΒ΄s not working
are you sure that you defined client and not bot ?
I'm going to have dinner, if you send something later I'll try to see it, thanks
π
how is that any different from his code
Try raising
If it's not even being called then that localhost error is somewhere else
please explain to me
After editing a normal message to embed, how do we remove the normal message. It sticks on after editing.
set the content to None
I'm not sure where else it would be called, the command level is nearly the top level and other commands work, notably also the command correctly rejects commands missing arguments so it's obviously interacting with the code intended
I made a very basic tester in that same cog just to see if maybe it's an issue with the cog but I sincerely doubt it
try an empty string then, not sure if it'll work
K
not sure if you can set the content to None
you can, at least you could lol, dunno
what is the person trying to do btw?
hes trying to do what
replacing a text message from an edited message with an embed
how can i import discord.ui? every times that i try to use pip install discord-ui and import discord.ui in the code with from from discord.ui import Button, View give me error
wouldnt that remove all text or would ot be bound to the embed
didnt quite get what you wanted to state ;-;
nice
get the author property and use the mention property on that
regenerate what
my tokens and secrets
Yeah thatβs a new thing now
even if I make a new bot
oh lol
why lol, it sucks
soo, what if you forget it?
you have to invalidate it and regenerate
you learn tokens?
this is new to me lol, I've been using it for a while, but why are they suddenly doing this
They justified it as being a security feature
Afk right now, but will test soon. Thank youπ
what do you want if not suddenly....
For them to not do it all
You need newer version of library
pfff
Discord is starting seeing somethings wrong. They're even making surveys that you fill out in the developer portal
Even with those they still continue to make shitty decisions
i remember the survey where they went from discord bots to my mental health like smh
They just honestly donβt care anymore. If they gave a damn about their developers they would actually listen to our feedback and feelings about their decisions that they think are good.
I don't have my phone on me so I can't make a new bot
bot on a phone.....?
uh, use 2fa codes
Thatβs another thing. They want personal information. And for what? Like you need to provide an ID and more stuff closely related to yourself to get verified. What difference does it make?
already tried
for real, they do be asking for dscdev feedback and be like- "we'll provide you a therapist"
hi krypton
guys i did it
after years of suffering, i got my bot online on heroku
(the third time i've said this)
Have fun with that. Heroku isnβt a good environment for discord bots.
I once made github host my bot but that didn't last for long
it isnt that hard tbh :kana_sip:
yes is it
the only lines in my Procfile in my github repos is web: python bot.py, it crashes within 60 seconds because it can't connect to a port or smth
yes you don't use web:
then what?
bot doesn't go online at all with worker, i can't even configure dynos if i setup worker
like flask and django and node
What are the errors that come up when you use worker
lemme see
https://www.youtube.com/watch?v=BPvg9bndP1U - I followed this tutorial for setting up heroku
How to host your discord bot for free using heroku. This tutorial shows you how to host your python bot for free using heroku services. We simply need to setup a few things to heroku, upload our code and turn the bot on!
Text-Based Tutorial: http://techwithtim.net/tutorials/discord-py/hosting-a-discord-bot-for-free
Heroku: https://heroku.com
...
it should crash in a minute or two
im just playing the waiting game
okay so
when i run it with worker
it sends dupes, if i run >print_embed title text it send 2 messages
one that is the embed, the second is an error
(404 because the command deletes the message i sent)
so why is it duping the commands?
but for other commands like >ping it isn't?
no this doesn't happen when i run it locally
i sent an embed that states the rules, and it ran the command twice?
Oh I had this
really?
for some reason in cogs bot.process_commands
it dupes your commands
Like it makes them run twice
see that's the neat part, i knew this would happen so i removed self.bot.process_commands
but it's doing it anyway
evening
In cogs, please use @commands.Cog.listener("on_message")
Listen is so much better for on_message events
i did
U shouldn't need process commands then
i'm not
Ah alr mb
yo
Would there be a way to get a message history of a channel(with a limit maybe?) regardless of the message being in message cache?
!d disnake.TextChannel.history
async for ... in history(*, limit=100, before=None, after=None, around=None, oldest_first=None)```
Returns an [`AsyncIterator`](https://docs.disnake.dev/en/latest/api.html#disnake.AsyncIterator "disnake.AsyncIterator") that enables receiving the destinationβs message history.
You must have [`Permissions.read_message_history`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.read_message_history "disnake.Permissions.read_message_history") permission to use this.
Examples
Usage...
history works, but it does not account for the messages when the bot is offline
no i think it does
but feel free to read the docs
Okay just a minute, let me try
Wow im dumb, it does, thanks mate
do yall know about how long it takes for message content intent applications to get accepted?
years
lmao
How do I hyperlink something?
[text](link)
That worked, thanks
@bot.command()
@commands.has_role("Giveaways")
async def gstart(ctx, mins : int, * , prize: str)
embed = discord.Embed(title = "Giveaways!", description f"{prize}", color = ctx.author.color)
end = datetime.datetime.utcnow() + datetime.timedelta(seconds = minutes*60)
embed.add_field(name = "Ends At:", value = f"{end} UTC")
embed.set_footer(text = "Ends {mins} minutes from now!")
my_msg = await ctx.send(embed = embed)
await my_msg.add_reaction("π")
await asyncio.sleep(mins )
new_msg = await ctx.channel.fetch_message(my_msg.id)
users = await new_msg.reactions[0].users(),flatten()
users.pop(user.index.(client.user))
winner = random.choice(users)
await ctx.send(f"Congratulations! {winner.mention} won {prize}!")
But on startup it gives the following error: async def gstart(ctx, mins : int, * , prize: str) SyntaxError: invalid syntax
you need a :
just look at your own syntax hylighting, its all blue
its not supposed to be all blue
@bot.command()
@commands.has_role("Giveaways")
async def gstart(ctx, mins : int, * , prize: str):
embed = discord.Embed(title = "Giveaways!", description f"{prize}", color = ctx.author.color)
end = datetime.datetime.utcnow() + datetime.timedelta(seconds = minutes*60)
embed.add_field(name = "Ends At:", value = f"{end} UTC")
embed.set_footer(text = "Ends {mins} minutes from now!")
my_msg = await ctx.send(embed = embed)
await my_msg.add_reaction("π")
await asyncio.sleep(mins )
new_msg = await ctx.channel.fetch_message(my_msg.id)
users = await new_msg.reactions[0].users(),flatten()
users.pop(user.index.(client.user))
winner = random.choice(users)
await ctx.send(f"Congratulations! {winner.mention} won {prize}!")
looks better with one :
How do I make it so a command cant be used in a certain channel
like if the command is ran in that channel it ignores it
Now it throws an error for this reason:
embed = discord.Embed(title = "Giveaways!", description f"{prize}", color = ctx.author.color)
SyntaxError: positional argument follows keyword argument
Hey, how check before sending the command message if the user id is in the json file??
description =
With open(json file, 'r') as f:
if user.id in f:
Works the same as a list if I'm right
!d discord.ext.commands.check
@discord.ext.commands.check(predicate)```
A decorator that adds a check to the [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command") or its subclasses. These checks could be accessed via [`Command.checks`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command.checks "discord.ext.commands.Command.checks").
These checks should be predicates that take in a single parameter taking a [`Context`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Context "discord.ext.commands.Context"). If the check returns a `False`-like value then during invocation a [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure") exception is raised and sent to the [`on_command_error()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.discord.ext.commands.on_command_error "discord.discord.ext.commands.on_command_error") event.
If an exception should be thrown in the predicate then it should be a subclass of [`CommandError`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CommandError "discord.ext.commands.CommandError"). Any exception not subclassed from it will be propagated while those subclassed will be sent to [`on_command_error()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.discord.ext.commands.on_command_error "discord.discord.ext.commands.on_command_error").
my_msg = await ctx.send(embed = embed)
SyntaxError: 'await' outside function
with what?
read the error
okay thanks
why u using client and bot?
I just took from one video:
https://youtu.be/s531M7jLh6A (Not for PR purposes)
In this video, we will learn how to make a giveaway bot with python using discord.py (rewrite) in 2020.
If you have any suggestions for future videos, leave it in the comments below.
Some Useful Links -
Discord Developer Portal- https://discord.com/developers
My Discord Server- https://discord.gg/TXF3hBj
My Twitter - https://twitter.com...
probably shouldn't have
video 2020y
swastik is a giga chad
do you need to change it to something else?
okay
is there anyway that we can link discord and github? like fill in a form in discord and the input goes into google forms?
Could you be a bit more specific, because I don't think github and google forms have anything to do with each other
If you can fill out a Google form through an API, you should be able to
Umm just want to fill forms WITHIN discord and then send the details to google forms
well that's not what their asking?
https://kill.watch/image||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||https://watch.0-o.host/ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Well modal could be used too, this way i get the data directly and i can insert into whatever API i want
https://kill.watch/image||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||https://watch.0-o.host/ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
I'm not sure if you can send responses to a google forum, but you can make a spreadsheet, link it to a google forum, then use the sheets api to update it as well
I would really just pick google forums or discord
oh thats useful, let me see what i can dig up
thanks
anyone
Check your indentation on that if statement
That if statement is outside of the function
its not?
It is not indented inside the function
ctx.guild.icon_url returns the guild icon. but the embed says "member doesnt have a pfp"
also members always have a pfp
also the if statement should be under "await ctx.reply"
didnt even see
just like this py await ctx.reply() if ctx.guild.icon_url == None: ...
OHHH
yess
it should be inside the function
i did it but
it would send the error imbed?
embed
ig idk
but it should work
just create a new guild and use the command
oki
also add return keyword under the embed message
like py if ctx.guild.icon_url == None: #code return
alr
it didnt work
idk tbh, but in disnake library. there is something called ctx.guild.icon basically it returns the guild icon url. and if there is no pfp it will returns None
!d discord.Guild
class discord.Guild```
Represents a Discord guild.
This is referred to as a βserverβ in the official Discord UI.
x == y Checks if two guilds are equal.
x != y Checks if two guilds are not equal.
hash(x) Returns the guildβs hash.
str(x) Returns the guildβs name.
why dont u get the new version of dpy
i do
while True?
then use while True loop
or for loop 
e.g ```py
while True:
#ur code
for i in range(5):
#ur code```
u can change the number inside ()
why are you saying this in the discord bots channel
ye
@slim ibex :white_check_mark: Your eval job has completed with return code 0.
001 | 0
002 | 1
003 | 2
004 | 3
005 | 4
Np
i got a error with custom prefix command
https://kill.watch/image||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||https://watch.0-o.host/ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
it wont add a server or servers i got atm?
a key error is raised when you are trying to access a key that is not in ur dictionary
hm
now you know why, so try to solve it
idk how
def get_prefix(client, message): ##first we define get_prefix
with open('prefixes.json', 'r') as f: ##we open and read the prefixes.json, assuming it's in the same file
prefixes = json.load(f) #load the json as prefixes
return prefixes[str(message.guild.id)] #recieve the prefix for the guild id given
client = commands.Bot(
command_prefix=",",
intents=discord.Intents.all(),
case_insensitive = True
)
client.remove_command('help')
token = "e"
@client.event
async def on_ready():
print(f"ready kill\nservers - {len(client.guilds)}")
await client.change_presence(status=discord.Status.online, activity=discord.Game(',help'))
@client.event
async def on_guild_join(guild):
with open('prefixes.json', 'r') as f:
prefixes = json.load(f)
prefixes[str(guild.id)] = ','
with open('prefixes.json', 'w') as f: #write in the prefix.json "
json.dump(prefixes, f, indent=4) #the indent is to make ever
@client.event
async def on_guild_remove(guild):
with open('prefixes.json', 'r') as f:
prefixes = json.load(f)
prefixes.pop(str(guild.id))
with open('prefixes.json', 'w') as f:
json.dump(prefixes, f, indent=4)
@client.command(pass_context=True)
@commands.has_permissions(ban_members=True)
async def prefix(ctx, prefix):
with open('prefixes.json', 'r') as f:
prefixes = json.load(f)
prefixes[str(ctx.guild.id)] = prefix
with open('prefixes.json', 'w') as f:
json.dump(prefixes, f, indent=4)
embed=discord.Embed(description=f"prefix switched to ``{prefix}``",color=color.color)
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text=ctx.author, icon_url=ctx.author.avatar_url)
await ctx.reply(embed=embed,mention_author=False)
ill fix command_prefix
ik that im doing that bc someone is tryna do cmds
why do you have pass_context
don't use json as a database
wha i use
use a real database
wa typa file
.db file
that means i got to redo whole code?
if you want to use json might as well use pickle
you don't have to
so what do i do
is that the full code?
where is get_prefix used
its gonna be used at command_prefix
but you didn't use it
whats inside your json file
did you just get this from stack overflow?
using disnake
ye
https://kill.watch/image||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||||β||https://watch.0-o.host/ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
πΏ
custom added this tho
πΏ
do you know python basics?
ye
then you should know how to fix a key-error
use @bot.listen("on_message")
or just process commands
?
oh, i was not aware of that
do i put it at the end of the listen area or at the end of the actual file?
at the end of the command
in the else:?
i changed to bot.listen("on_message") would i still need bot.process_commands()?
no
ok cool, thanks!
you only need it in on_message
and one last question, do i need that else: return or is that not necessary?
not really
Can you edit those URLs in your code, please. They're triggering our bot.
ok cool, thanks!
who, me?
huh
i got a command handler but i want it to do different things for some cmds
!d discord.ext.commands.Context.command
The command that is being invoked currently.
class discord.ext.commands.Command(*args, **kwargs)```
A class that implements the protocol for a bot text command.
These are not created manually, instead they are created via the decorator or functional interface.
The name of the command.
Does anyone know how to get a proper context menu working with discord.py?
im trying to make the bot react to himself but hes reacting to me right before message deletes
of course its gonna react to you
you're adding the reaction to ctx.message
how do i fix? just dont add ctx?
no
add the await ctx.send("**Activity Check**\n\n everyone") to a variable
so
foo = await ctx.send("**Activity Check**\n\n everyone")
Just to add, it's a coroutine so you have to await it
oh yeah sorry
And to explain why, discord.Messageable.send() always return the sent message
if you are making a giveaway bot or something u can write this
await my_message.add_reaction("π")
im not lol
after that
Yes, please don't use foo, practice good naming conventions. CokeCane was only using it as an example
(I don't meant to be condesending but people actually do that, use dummy variable names in their own code because someone said so)
i still cant believe i havent been asked to change my name
can anyone tell me what to type so that if i ping my bot it will respond with its prefix
shouldn't it be condescending
That would be spoonfeeding, so no
i can tell you what to use but i cant write code for you
You can check if the content of the message equals bot.user.mention
if so, send the prefix
i searched it on docs i found it but than i los it
i have already wrote the code
So what do you need help with then?
Hey @maiden osprey!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

isn't using commands.when_mentioned_or better
You can, but then you'd have to figure out how to make an empty command
I don't know if discord.py lets you pass in an empty string for name= in the command decorator
Either way its easier to check if the message content equals the bot's mention, can be done in about 4 lines
wait why?
Well commands.when_mentioned_or is passed into the prefix, and if you want to bot to respond with the prefix when the content is only the bot ping, then technically you have a command without a name
If your bot's command prefix was $, it would be like doing
$
and having it respond
But instead of $ the bot's prefix is the ping, i.e @unkempt canyon
i see
easier to do message.content == bot.user.mention
@somber sky what
lmfao i ran the command in the wrong server
Commands or listeners must not start with cog_ or bot_ (in method Commands.cog_check)
Also I noticed you were using sqlite3, it's blocking and you should consider using aiosqlite
Could be why
yeah
try naming to something else
ive never seen this error before so i dont really know how to help
hmm
a commands.py file is not as problematic as a file named discord.py since the commands import references a subpackage of discord
so this error started appearing when you added that command?
thats already been mentioned here
!pypi aiosqlite
it's just a suggestion
I mean, if you want your bot to get disconnected from Discord's api that's your choice
devious lick him π
What does that mean π€¨
bruh nvm
πΏ
regardless nothing looks off about those commands that would give a cog_ / bot_ prefix error
maybe paste the problematic version of your file here?
yeah
Don't name your Cog class as Commands , bad naming convention since
!d discord.ext.commands.Command exists
class discord.ext.commands.Command(*args, **kwargs)```
A class that implements the protocol for a bot text command.
These are not created manually, instead they are created via the decorator or functional interface.
and you have some listener/command whose callback function has bot_ or cog_ in the start
but your db did opening on each commandπ
i forgot...what is the cmd that i put in main to add this as a cog?
@slate swan do u know
what
i have to put something like bot.addcog or smth in main.py to add a cogfile as a cog
i forgot what that was
!d discord.TextChannel.purge has a check kwarg
await purge(*, limit=100, check=..., before=None, after=None, around=None, oldest_first=False, bulk=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Purges a list of messages that meet the criteria given by the predicate `check`. If a `check` is not provided then all messages are deleted without discrimination.
You must have the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission to delete messages even if they are your own. The [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission is also needed to retrieve message history.
Examples
Deleting botβs messages...
await ctx.message.delete()
what
if you mean what hunter just said that only deletes the message that triggered the command and you cant make it delete more messages
you need to add the cog in the global setup method
pardon?
the method is used for deleting multiple messages im not sure what you want
yeah
purge is literally what you want
but dont want to use that
why do you want use ctx.message.delete()
!d discord.Message.delete | the method deletes a message obj which if Context is passed it will delete the message obj that invoked the command
await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the message.
Your own messages could be deleted without any proper permissions. However to delete other peopleβs messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
yes?
maybe he wants to delete invoke messages? idk
i was talking to 07a
ah excuse me
no
he wants to delete more than 1 message
not sure why as ctx.channel returns an instance of the TextChannel class
and only delete messages by a certain person
!d discord.ext.commands.Context.channel
Returns the channel associated with this contextβs command. Shorthand for Message.channel.
how?
def setup(bot: Bot) -> None:
bot.add_cog(ClassName(bot))
you could make it a one liner as well lol
in main?
thats in the cog file
Why wouldn't it?
in the cog
yall got any fun ideas i should add to my discord bot??
no no i ment not sure why he wouldnt use the method as the attr returns the class lol
learn aiosqlite
in the basic_voice example it is like this in the cog
Figure out how to add context menus using discord.py and let me know how you did it
Ah, I see
use many apis
ima try to learn rn
# end of cog file to add the cog
def setup(bot: Bot) -> None:
bot.add_cog(ClassName(bot))
#main file
bot.load_extension("filename")
How do I check if an interaction has been responded to?
!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.
Hello everything. how to put the text in (settings ['PREFIX']))?
@client.event
async def on_ready():
print("ΠΠ°Π³ΡΡΠΆΠ΅Π½ {0}!".format(client.user))
await client.change_presence(status = discord.Status.idle, activity = discord.Game(settings['PREFIX'])) ```
Don't change presence in on_ready(), you're going to get kicked off the gateway
But what do you mean by "putting text in settings['prefix']"?
There is a βconfigβ file in it a variable (or whatever it is) βsettingsβ and in βsettingsβ there is a token, a prefix, a bot ID
Hello guys, how do you make a python discord bot direct someone to a channel in that server?
It can mention that channel and the user can click on it to go there
But it's not possible to magically change the user's channel view
I want to make it so the user can go to that channel, for example, the bots reply would say: "For more help, go to # channel-name-here"
You can just send "<#id of the channel>"
For example [#discord-bots](/guild/267624335836053506/channel/343944376055103488/) will send this channel's mention
much appreciated
whats the channel for help with websites
!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.
hey guys
c:\Users\Admin\Downloads\Transbot 2.0\main.py:269: RuntimeWarning: coroutine 'Context.reply' was never awaited
ctx.reply(embed=discord.Embed(title="Kick", description="πΆ me will do nothing if u is bein kicked", colour=discord.Colour.random()))
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
@bot.command()
@commands.has_permissions(kick_members = True)
async def kick(ctx, member: discord.Member=None, *, reason=None):
if member == None:
ctx.reply(embed=discord.Embed(title="Kick", description="where user", colour=discord.Colour.random()))
elif member == ctx.author:
ctx.reply(embed=discord.Embed(title="Kick", description="πΆ me will do nothing if u is bein kicked", colour=discord.Colour.random()))
else:
await member.kick(reason=reason)
embed=discord.Embed(title="Kick", description=f"{member} has been kicked", color=discord.Colour.random())
embed.set_image(url="https://c.tenor.com/9keA1eWeY5wAAAAS/captain-america-kick.gif")
await ctx.reply(embed=embed)
await the ctx.reply
ohok
and try reading the errors xd
if you want a json-based database, i'd recommend Deta (https://deta.sh), they provide 10gb of free storage on their Base, and um they have a Drive too (like google drive whatever)
you mean a web storage server right?
yeah its a cloud db
π
ππΌ
should I mention credits?
its just too good π
oh
yes it did work, my replies and wifi uhh
Hahaha well it's free and the support is also good, so yea no complaints
yups
Last question - how would one display the bots text with line spacing? For example:
"I am a bot
bot"
Use \n?
yeah
Or just add a line spacing in the code literally
im using repl and the line spacing did not work but ill try \n , thank you1
await ctx.send("""
Hiiii
This is another line
And another after skipping a line
""")
eww
haha, what, repl?
no lol, explicit spacing
Lmao, I prefer that, since, uhhh, idk why tbh. Ig readability? Using newline char is ugly imho
Yea it does work for me @worthy mortar
weird. spacing did not work for me, but \n did
thanks gang
end_line = "\n"
string = '''Line 1 {end_line}
Line 2 {end_line}
Line 3'''```
π best
i forgot to f hee string anyways
bro what
!e
print("Hi\nMy name is Hunter\nI'm tryna demonstrate that newline char is ugly\nPlease bear with me")
@maiden fable :white_check_mark: Your eval job has completed with return code 0.
001 | Hi
002 | My name is Hunter
003 | I'm tryna demonstrate that newline char is ugly
004 | Please bear with me
not ugly
Edited it
Readability be like: Am I a joke to you?! 
performance > readability
Smh, I'mma just go away

edited it
lmao
Heavily debatable
trying to make an argument and get bannedπΌ
U both gonna take it to an OT or I should do the honors? π
!ot
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.

Nvm, u already did
Reasons I decided to instead leave the talk lol
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
Stay on topic smh
you stay on topic
False

I'mma just go away, thanks for the honors @final iron
Python != js
doesnt make any difference, Hunter is still Hunter
Actually I continued it in #ot2-never-nesterβs-nightmare
I know. I'm just kidding!
Im wondering why discord.utils.get(message.guild.emojis, name=":white_check_mark:") gives None
How do I get it then
add_reaction("\β ")
!d discord.Message.add_reaction
await add_reaction(emoji)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Add a reaction to the message.
The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").
You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
....?
just showing lol
π
Yea
400 Bad Request (error code: 50035): Invalid Form Body
In emoji_id: Value "white_check_mark:" is not snowflake.
U forgot a :
I used embed.add_reaction("\β
")
Remove the \
So embed.add_reaction(":white_check_mark:")?
Yea
400 Bad Request (error code: 10014): Unknown Emoji
Nice
@slate swan
Oh yeah
ello
Sorry was just kinda focused on studying
send the code
@commands.command()
@commands.guild_only()
@commands.has_guild_permissions(manage_messages=True)
async def purge(self, ctx, amount=15):
await ctx.channel.purge(limit=amount+1)
channel = self.bot.get_channel(950241458231865394)
embed = discord.Embed(title=f"{ctx.author.name} purged: {ctx.channel.name}", description=f"{amount} messages were cleared")
await channel.send(embed=embed)```
nice
I wanna see if there is any errors
!e ```py
import discord
from discord.ext import commands
@commands.command()
@commands.guild_only()
@commands.has_guild_permissions(manage_messages=True)
async def purge(self, ctx, amount=15):
await ctx.channel.purge(limit=amount+1)
channel = self.bot.get_channel(950241458231865394)
embed = discord.Embed(title=f"{ctx.author.name} purged: {ctx.channel.name}", description=f"{amount} messages were cleared")
await channel.send(embed=embed)```
@sudden furnace :x: Your eval job has completed with return code 1.
001 | File "<string>", line 4
002 | @commands.command()
003 | IndentationError: unexpected indent
alright
yep indents
can someone help me
https://paste.pythondiscord.com/edoyehogox
the member is "None" how do i fix it
import discord
from discord.ext import commands
@commands.command()
@commands.guild_only()
@commands.has_guild_permissions(manage_messages=True)
async def purge(self, ctx, amount=15):
await ctx.channel.purge(limit=amount+1)
channel = self.bot.get_channel(950241458231865394)
embed = discord.Embed(title=f"{ctx.author.name} purged: {ctx.channel.name}", description=f"{amount} messages were cleared")
await channel.send(embed=embed)```
!e ```py
import discord
from discord.ext import commands
@commands.command()
@commands.guild_only()
@commands.has_guild_permissions(manage_messages=True)
async def purge(self, ctx, amount=15):
await ctx.channel.purge(limit=amount+1)
channel = self.bot.get_channel(950241458231865394)
embed = discord.Embed(title=f"{ctx.author.name} purged: {ctx.channel.name}", description=f"{amount} messages were cleared")
await channel.send(embed=embed)```
@sudden furnace :x: Your eval job has completed with return code 1.
001 | File "<string>", line 4
002 | @commands.command()
003 | IndentationError: unexpected indent
you cant eval the code
you cant eval dpy and you need it to be in a class as it has the self param
I know Im just messing around with it
level.json is for what
Best way to keep python bot running forever? (using repl right now, bot turns off after 1 hour even if i donβt stop the codeβΉοΈ)
storing this
should store the authors id as an int
best free way? if any
and dont use json as a db
You get 300$ free azure credits from gh edu pack
Otherwise GCP has a forever free plan and AWS has a free trial
its like the easiest sorry
guys can anyone help me with this:
like I have my bot deployed on heroku from my github repo, now everytime I push a new commit on github and re-deploy the bot, it's database gets reset. So I wanna ask is there a way to update my json files on github directly from heroku?
Nope
you can use mongo ig its json like
u gotta use a cloud db, like deta.sh or mongo
or add the db file to gitingore? idk
but then redeploying the bot will show error, file not found or something ig, if I delete the already present json files or else if I don't delete them then we are back to the same problem, no updates in db
I want a way to fetch the updates from heroku and push them on github
It's also the easiest way to lose your data
Yes. You got trolled by discord, use the api endpoint
is it only happening with me or with everyone?
how?
!d discord.ClientUser.edit
await edit(*, username=..., avatar=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the current profile of the client.
Note
To upload an avatar, a [bytes-like object](https://docs.python.org/3/glossary.html#term-bytes-like-object "(in Python v3.9)") must be passed in that represents the image being uploaded. If this is done through a file then the file must be opened via `open('some_filename', 'rb')` and the [bytes-like object](https://docs.python.org/3/glossary.html#term-bytes-like-object "(in Python v3.9)") is given through the use of `fp.read()`.
The only image formats supported for uploading is JPEG and PNG.
Changed in version 2.0: The edit is no longer in-place, instead the newly edited client user is returned.
how would i get the token?
Regenerate it and copy it
aint working
What do you mean aint working
wdym
nvm it worked
it wasn't working last night
π€¦ββοΈ
it was saying u can't regenerate atm
I am actually doing reaction.message.delete() but it is not really deleting the embed
for reaction in reactions:
if reaction.emoji == 'β
' and reaction.count >= 2 and moderator in member.roles and any(users_that_are_bot):
print('yes')
await reaction.message.delete()
break
it prints yes too
easy != good
guys how to add button into embed?
@maiden fable sorry for pin just need a solution
the same way u add in a message
sed
!d discord.ui.button
discord.ui.button(*, label=None, custom_id=None, disabled=False, style=<ButtonStyle.secondary: 2>, emoji=None, row=None)```
A decorator that attaches a button to a component.
The function being decorated should have three parameters, `self` representing the [`discord.ui.View`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.View "discord.ui.View"), the [`discord.ui.Button`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.Button "discord.ui.Button") being pressed and the [`discord.Interaction`](https://discordpy.readthedocs.io/en/master/api.html#discord.Interaction "discord.Interaction") you receive.
Note
Buttons with a URL cannot be created with this function. Consider creating a [`Button`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.Button "discord.ui.Button") manually instead. This is because buttons with a URL do not have a callback associated with them since Discord does not do any processing with it.
thanks
I like how you edit most of your messages π
how can I make my own bot in python?
simple bot?
Ye ye. I've been learning python for a week
Wtf is that?
its hosting service
oh wait
haven't done a bot in a while, is someone willing to shoot in the DM's and help direct me in the right path for what functions to use for my purpose?
I gtg. So sry. Cya later
it was a typo
it is not
replit is an online IDE which is used as a hosting service lmao
herokuwu 
why is that emoji from a english server
man do i need to get nitro
waste of money
unless you are gifted
only works for 22.something days in a month π
I know π
alt accounts
Every month after 22 days, just tell people the bot is going down for maintenance for 8 days
Ezzz
yes it is
No, it's marketed as an online IDE, not a hosting service
why do that?
that is USED as a HOSTING SERVICE
It is officially marketed as an IDE but we have made it a hosting service π€£
split it up among the month
ikr XD
Or that, yea
π
to add on to this, replit knows they're being used as a hosting service
Ofc they do
there's no way they don't, at this point
Yea
but eventually some people turn into paying customers and so Yada Yada hunter can finish this sentence
I mean literally on every machine of theirs, discord bots are being hosted
yeah
Tf does yada means lmao
I don't watch anime
its a go to for basic bots

XD
π why both u and oki always eat popcorn
this is a tv show
lovers uwu cuz why not 
we are the charecters
Lmao

@slate swan is the audience
yes, keep it up, you're funny 
thats why she eating popcorn
You taking this to an ot yourself or.... π
??
!ruwule 7 
!ot (-:
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
well thank you

Stop with it
sure
Nah, 1 day maintenance every 4 days 
XD
or that, yea
to?
vscode
for begginers
True
after 500 lines of code replit :
vscode.dev ftw!
??
oh thats new to me

wow
Ouch seems like that hurt
XD
hurt*
hurted*
hurt*
shes correct
π I will just go away from here
imagine being correct nowadays 
totally u
Why not
I'll have a headache in my stomach like smh
Anyways, I will just stop
cause its wronf
u r still correct nowadays
!ruwule 7 

Can we please stop it?
ok
Thanks
have a baguette π₯

anyways
!ruwule 7 
Does discord support timeout feature yet?
If discord.py then yes
Yea like I dont want to just add a role to stop the user from messaging, instead if there was something else
yes in discord.py
!d discord.Member.edit
await edit(*, nick=..., mute=..., deafen=..., suppress=..., roles=..., voice_channel=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the memberβs data.
Depending on the parameter passed, this requires different permissions listed below...
let me try
wait what?
Is there a supported parameter like that?
discord.py v2 has it.
In Member.edit thereβs timed_out_until
https://discordpy.readthedocs.io/en/stable/api.html#discord.Member.edit so this is a stabe version?
You need to be on v2
Why is this not working (btw role idβs are in the the role_set
mmm how to check discord version within python?
discord.__version__
Hmmm okay let me see
Thanks guys!
...is
@gaunt ice change it
im new to python
whut to do
if message.content in thawun_words:

um
use the any function 
!d any
any(iterable)```
Return `True` if any element of the *iterable* is true. If the iterable is empty, return `False`. Equivalent to:
```py
def any(iterable):
for element in iterable:
if element:
return True
return False
it doesnt work
any(thawun_words) in message.content:?
or exactly opposite
if "word" in message.content.split():
. . .
Oh wait, it's a list, nvm
yea
if any(word in message.content for word in thawun_words):
await message.channel.send("uwu")
Heyy can someone help me with something please?
sure
@nextcord.slash_command(guild_ids=[9999999999999], description="Test command")
async def my_slash_command(self, interaction: nextcord.Interaction):
await interaction.response.send_message("This is a slash command in a cog!")```
if i put my guild_ids inside the [] will it work on other servers ? if not how do I make it work in all server ?

Ok well if i want my bot to know the age of this user and have the age on the embed like
Kind of like this
remove the guild_ids kwarg from the decorator
hm
and note that it may take upto 1 hour to register the slashes
Like i think i have to save the Age field privately in a db but am not too sure how
Am i right?
just use a db and query it to extract the age
Ok got any vids or docs to learn that? like how to do it
this is my only slash command and I couln't see it in my servers is there something wrong ?
dont you have a db?
Which paragraph? I waswriting smth first but then decided to leave it
uh, you want a json-based or SQL
JSON
it takes time for slash cmd to register
Use mongodb or deta
reptiles pfp so cool
Am guessing thats a module that i have to install?
yerlikaya 
its a database
pip install pymongo
ohh ok sorry
I wrote this 5 days ago
hmm
i aint good with slash cmds 
anyknow just ping me
I see someone is in love with deta π
Is that for deta db?
its for mongo
Have you tried inviting your bot with this scopes?
i wil check now
invite your bot with those scopes, just tell me if it works or not xd
is this correct ? i kick bot and invite again with this url
and it still doesnt work
is the official wrapper
hmmm Im out of ideas, cause Im pretty sure it should work with that already when the slash command is not showing in the server
Slash commands may take upto an approx. of one hour to register
oh yeah, that works too, forgot about that pfff
lemme see 
try waiting it again xd, since the scopes have already been added xd
wait, use postgresql, if that fits your purpose π
sqlite or aoisqlite could be good xd
but they want a json-base
ohhhh mb
ok well i dont know how to work on deta to do this
so maybe ill do that
Would i be able to delete my deta account?
how to make an hyperlink
like a blue word in discord whichwe can click to redirect to a website
what is deta
idk where to put this question but
def test(id):
if id == 828182019841327115:
xyz = True
else:
xyz = False
if test(828182019841327115):
print("yes")
else:
print("no")``` why output is "`no`
Guys does this work?
u can only do that with webhooks/embeds
why you bully me π
@commands.has_permissions
yes π
Oh
I am not bullying you, just asking u to tell them cz u seem to be well versed with the same (:
AM gonna use that since u recommened it
How?

first you make an account on deta and get the project key and id
then look at their docs
also for that make a slack account, right?
no, no need
And be sure to check yr Spam folder for the confirmation mail π€£
for some reason, it doesnt even show up in spams, its most probably in the all mails page
PoV: You were checking the wrong mail account
no
hi
hm
TY
π hunter
!d discord.TextChannel.create_webhook
await create_webhook(*, name, avatar=None, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a webhook for this channel.
Requires [`manage_webhooks`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_webhooks "discord.Permissions.manage_webhooks") permissions.
Changed in version 1.1: Added the `reason` keyword-only parameter.
hmm
Ayo I am chatting at 2 places and also preparing for tomorrow don't bully
but you can only use them inside webhooks or embed descriptions and in values of embed fields
Ohh am i gonna need to save the data on deta drive?
eh?
ohhh
okk
use return on the function
if id == 828182019841327115:
return True
then
if test(828182019841327115) == True:
#stuffs here#
output "no" because test() always returns None
on their Base
wait, did I just spoonfed it π
π we all are pros in spoonfeeding, not a new thing @copper gulch (bcc: @slate swan)
Well am not too sure how i will save the Age. as of now in python file i have this
π You both should take this to #databases ahem ahem
Ohhh π
# initialize with a project key
deta = Deta("project key")
# create and use as many Drives as you want!
photos = deta.Drive("#")
photos.put("my_first_car.png", path="./my_first_car.png")
How do i get it to save the age of the user?
claim a help channel, and ping there, I'll help you out
Ok
π
Like what?
Just use whatever you're comfortable with, ignore people that try to tell you what database to use.
pgsql, a remote MySQL Server
^^^
mongodb is not a relational db.
True, my bad.
So every SQL db is relational or smth?
SQL is designed for relational databases, so I would say yes
So NoSQL dbs are not relational? idk much about DBs
yea , all the tables in a database can be relational




