#discord-bots

1 messages ยท Page 744 of 1

vale wing
#

Does your command have like

@command_name.error```
quick gust
#

no elifs?

vale wing
#

Also it shouldn't really return something

humble granite
#

my command has:

@commands.command()
@commands.bot_has_permissions(administrator=True)
vale wing
#

And yeah add elifs

humble granite
#

forgot haha

#

just added elifs and still happens

vale wing
#

Can you show us create_embed method?

humble granite
#
async def create_embed(self,ctx,description,author):
    print("Error embed")
    em = discord.Embed(description=description,
                       color=0xeeffee, timestamp=ctx.message.created_at)
    em.set_author(name=author,icon_url=self.bot.user.avatar_url)
    em.set_thumbnail(url=self.bot.user.avatar_url)
    await ctx.send(embed=em)
vale wing
#

Okay error is not in there

placid skiff
#

what IDE are you using?

humble granite
#

PyCharm

surreal sierra
#

ah I did have an error handler, I removed it now and got this error. why does it say * is not supported?

vale wing
#

bet is none

placid skiff
humble granite
#

okay, gimme a minute

vale wing
#

@humble granite I still have the feeling that there's a local error handler

placid skiff
#

debug the on_command_error event and your create_embed async func

vale wing
surreal sierra
humble granite
#

Just debugged it and it tells me the create_embed async was called 2 times

placid skiff
quick gust
#

send your error handler once again

#

(what u have right now)

vale wing
#

Nice

placid skiff
tulip oracle
#

how can i add roles to a channel with specific permissions what method? i looked at permissions_for but its just returns and i cant find a channel update

humble granite
# quick gust (what u have right now)

didn't get any error. just the print from the code down below

async def create_embed(self,ctx,description,author):
    print("Error embed")
    em = discord.Embed(description=description,
                       color=0xeeffee, timestamp=ctx.message.created_at)
    em.set_author(name=author,icon_url=self.bot.user.avatar_url)
    em.set_thumbnail(url=self.bot.user.avatar_url)
    await ctx.send(embed=em)
vale wing
#

@humble granite search for regex @.*\.error in code

quick gust
#

since thats where create_embed is being called

tulip oracle
placid skiff
tulip oracle
humble granite
#
@commands.Cog.listener()
async def on_command_error(self,ctx, error):
    if isinstance(error, commands.CommandNotFound):
        return await self.create_embed(ctx,f"d","Missing Permissions")
    elif isinstance(error, commands.MissingPermissions):
      return await self.create_embed(ctx,f"Y","Missing Permissions")
    elif isinstance(error,commands.BotMissingPermissions):
      return await self.create_embed(ctx,f"Missing perms","Missing Permissions")
    else:
      print(error)
      return await self.create_embed(ctx,f"u","Unkown Error")
vale wing
vale wing
unkempt canyonBOT
#

await set_permissions(target, *, overwrite=see - below, reason=None, **permissions)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Sets the channel specific permission overwrites for a target in the channel.

The `target` parameter should either be a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") or a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") that belongs to guild.

The `overwrite` parameter, if given, must either be `None` or [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/master/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite"). For convenience, you can pass in keyword arguments denoting [`Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions") attributes. If this is done, then you cannot mix the keyword arguments with the `overwrite` parameter.

If the `overwrite` parameter is `None`, then the permission overwrites are deleted.

You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this...
quick gust
#

just print or send

vale wing
humble granite
#

Okay @vale wing

#

hmmm. gives no error. but theres a new problem now.
It sends the message 4 TIMES and i get it 2 times in the log

tulip oracle
humble granite
vale wing
#

@humble granite so you didn't find any code matching that regex?

humble granite
#

yes

quick gust
stable berry
#

Hello

@client.command(aliases=['user','info']) 
@commands.has_permissions(kick_members = True)
async def whois(ctx, member : discord.Member):
 embed = discord.Embed(title = member.name , description = member.mention , colour = discor.colour.#00FFFF())
 embed.add_field(name = "ID", value = str(member.id), inline=True )
 await ctx.send(embed=embed)

Is giving syntax error in last line

vale wing
#

Other commands send single response?

limpid thicket
quick gust
#

like MissingPermissions or what

quick gust
vale wing
stable berry
limpid thicket
stable berry
quaint epoch
limpid thicket
#

Also color should be.

#

color=0x00FFFF

vale wing
#

discoc.colour.#00FFFF() is invalid color construction

quaint epoch
humble granite
stable berry
stable berry
limpid thicket
#

You should use color=0x00FFFF

#

When classing your discord.Embed object

quaint epoch
#
@client.command(aliases=['user','info']) 
@commands.has_permissions(kick_members = True)
async def whois(ctx, member : discord.Member):
  embed = discord.Embed(title = member.name , description = member.mention , colour=0x00FFFF)
  embed.add_field(name = "ID", value = str(member.id), inline=True )
  await ctx.send(embed=embed)```
limpid thicket
#

I'll just write you the code 1 sec

stable berry
#

But it's showing invalid hexadecimal literal

humble granite
limpid thicket
#
@client.command(aliases=['user','info']) 
@commands.has_permissions(kick_members = True)
async def whois(ctx, member : discord.Member):
  embed = discord.Embed(title=member.name, description=member.mention, color=0x00FFFF)
  embed.add_field(name="ID", value=str(member.id), inline=True)
  await ctx.send(embed=embed)
#

Is how it should be.

quaint epoch
limpid thicket
#

No.

#

0x is there to define it, it doesn't error.

placid skiff
humble granite
#

yes

stable berry
#

But with them it's not showing

placid skiff
#

Just write await self.send_embed

limpid thicket
#

Ah sorry.

quaint epoch
#

so, i was right

limpid thicket
#

I wrote british version of color

#

WAIT

stable berry
quaint epoch
#

colour?

limpid thicket
#

IT'S COLOR LOL

quaint epoch
#

yo yo caps

stable berry
#

It should be colour

quaint epoch
#

color and colour, bruh

limpid thicket
#

I swear both don't work.

quaint epoch
#

im canadian so i use colour

vale wing
#

Color is an alias to Colour

stable berry
#

Color is not working

limpid thicket
#

I literally remember trying.

quaint epoch
stable berry
#

๐Ÿฅฒ

vale wing
limpid thicket
vale wing
#

I think even docs say it like that

limpid thicket
#

I edited other stuff too.

vale wing
#

Mk

quaint epoch
#

!d discord.Colour

unkempt canyonBOT
#

class discord.Colour(value)```
Represents a Discord role colour. This class is similar to a (red, green, blue) [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)").

There is an alias for this called Color...
quaint epoch
#

YO

limpid thicket
#

a

quaint epoch
vale wing
#

In the source code it is py Color = Colour

stable berry
placid skiff
quaint epoch
#

canada ftw

limpid thicket
#

Surprised tbh.

quaint epoch
#

lmao

#

Confusing af

humble granite
vale wing
limpid thicket
humble granite
#

so i've just made a ctx.send instead of the self.send_embed. it sends the message only 1 time

limpid thicket
#

I thought you would of.

vale wing
#

@humble granite is your bot like very big

placid skiff
vale wing
#

Cause if it's not I'd like to look at that thing by myself

quaint epoch
#

like, 2000 lines?

limpid thicket
#

What's the error?

vale wing
#

> 500 lines

quaint epoch
humble granite
stable berry
#

๐Ÿฅฒ

limpid thicket
#

Is your indentation correct?

stable berry
#

Yes

quaint epoch
limpid thicket
#

What are you using to run code?

stable berry
#

Ok

placid skiff
stable berry
vale wing
limpid thicket
#

Replit?

stable berry
#

Yes

#

Me totally confused

humble granite
stable berry
#

Now

quaint epoch
#

brb

vale wing
humble granite
#

that too

vale wing
#

It doesn't seem like the problem is in global handler

stable berry
#

What should I do now should I do it in vs code ?

placid skiff
vale wing
#

There's another thing I can't really tell until look at the whole thing

vale wing
vale wing
stable berry
#

Ok ๐Ÿฅฒ

vale wing
stable berry
limpid thicket
#

Can you send a picture of your code if it's small enough to fit.

vale wing
#

@stable berry arrow very gud ik

placid skiff
vale wing
#

He said his IDE is VSC iirc

stable berry
humble granite
#

can i send links in here?

placid skiff
#

Yes

vale wing
#

Yes

manic wing
placid skiff
#

Pastebin

humble granite
vale wing
#

Does the python bot have malicious links filter btw

vale wing
stable berry
#

@limpid thicket

manic wing
#

you need a ) after colour

#

also remove the " in the colour, its an int

limpid thicket
#

I didn't paste that though.

manic wing
#

!e py print(type(0x123))

unkempt canyonBOT
#

@manic wing :white_check_mark: Your eval job has completed with return code 0.

<class 'int'>
slate swan
limpid thicket
#

There isn't meant to brackets nor in a str

stable berry
limpid thicket
#
@client.command(aliases=['user','info']) 
@commands.has_permissions(kick_members = True)
async def whois(ctx, member : discord.Member):
  embed = discord.Embed(title=member.name, description=member.mention, color=0x00FFFF)
  embed.add_field(name="ID", value=str(member.id), inline=True)
  await ctx.send(embed=embed)
#

Just use this and then paste image of error.

stable berry
#

Me pasting this

humble granite
manic wing
vale wing
#

Hm I should look at these more attentively

manic wing
#

it doesnt seem to work as it is

vale wing
#

@humble granite if you call any other command that sends something does it send that once or twice as well?

stable berry
#

Thanks duck bot worked @limpid thicket ig i copied hrlo77 s code

humble granite
#

only the one with the @commands.bot_has_permissions()

limpid thicket
vale wing
stable berry
humble granite
#

okay

#

@vale wing this works

placid skiff
stable berry
#

Thanks ezenifix and duck ( thanks alot)

humble granite
#

UPDATE: I said it sends the message 1 time if I replace the self.create_embed with ctx.send. Now it sends that 2 times too. with reset token.

humble granite
placid skiff
#

I still think that the problem is that you return your error handler

humble granite
placid skiff
#

The last thing that remains is that you are trying without closing the current execution ๐Ÿ˜‚

vale wing
humble granite
humble granite
vale wing
#

Interesting

#

So the new command sends it twice still?

humble granite
#

no

placid skiff
vale wing
#

Only error handler?

humble granite
placid skiff
#

Just do one which checks the permissions of your bot

humble granite
#

so I've just executed the command with a custom error and this gets called twice. it's even in the log

placid skiff
#

But no that is impossible, don't do that
The only thing that could make this happen is that you return, i know that you already tried without it but it is the only reason it does that. There is what happens: when you call the command the bot raise the bot_missing_permission error, then in your error handler you return the function which means that you return to the point where it checks bot permission, from that it goes to your command again, the bot attempts to ban the user but it doesn't have enough permission so the bot raises again bot_missing_permission error and it does again the same thing

vale wing
#

Um

#

Return doesn't really return to the check

#

If the check is failed it just raises an error and stops on working with command

placid skiff
#

It returns to the point where the function is called

#

To know if i'm right we can do one simple thing:
@humble granite add a for loop before you execute the command, make it in range 5, it should print 6 times the error

slate swan
#

Does anyone know how to code reaction roles?

#

Cus I've looked everywhere

#

nothing works

#

Use the on_(raw_)reaction_add event.

placid skiff
#

on_raw_reaction_add is better

slate swan
#

Depends

placid skiff
#

Whell the bot can't store messages in the cache while it is offline

slate swan
#

also all the code ive tried is channel dependent, meaning that it only works in 1 channel of 1 sever, how do I get around that?

slate swan
#

you need to understand that commands are context based: they'll execute differently based on the conditions met

#

for example, ctx.guild is not an attribute that exists inside of a dm channel context

placid skiff
slate swan
#

oh, so like a .json file?

placid skiff
slate swan
#

not if you want to have a good time, no

placid skiff
#

Well to testing json is good enough

slate swan
#

json should only be used for data that doesn't require constant access

vale wing
#

@placid skiff well I just simulated his situation got everything ok
Not in cogs but normal

@bot.listen('on_command_error')
async def command_error_controller(ctx: commands.Context, error: commands.CommandError):
    print(error)
    await ctx.send(f'Error lul')
    return 'Some return whatever'```
#

It doesn't matter what error handler returns but typically it shouldn't return anything

slate swan
slate swan
vale wing
#

Btw how to store a list in sqlite (besides putting a string to there and splitting it)

slate swan
#

you should really read this text to understand the implications of using json to store data in the case of a discord bot

vale wing
#

Or even better a dict

placid skiff
#

Sqlite doesn't have such row types

vale wing
#

@humble granite hold up check if you are adding the cog with error handler once

#

Maybe you've added it twice not sure if it can do anything about it

vale wing
#

Relative one

#

Not json-like

slate swan
vale wing
#

sqlite3

#

Good for starters

#

If you don't wanna learn sql you can use a wrapper, I actually have one published on my github (but its functionality is very limited) maybe there are other

placid skiff
#

I use sqlite too lol

vale wing
#

Seems like postgre does

#

As I look at its codes they seem complicated but I should learn it most likely

#

Omg it can even store jsons inside

#

Postgre seems epic

slate swan
#

how do I use SQLite in my bot

placid skiff
vale wing
#

I can implement that thing by myself but thanks

placid skiff
vale wing
#

I didn't actually watch tutorials I read sqlite docs troll

placid skiff
#

๐Ÿ˜‚

vale wing
#

Why would I name it db

frank tartan
#

How can I make it so when someone presses a button, it checks if they send the message. If they didn't send the message, it privetly sends them a message saying that its not for them

#

i hope that makes sense

vale wing
#

You mean make a button for specified person?

#

Alright first tell us what library do you use

frank tartan
frank tartan
vale wing
#

Delete it there's token

#

And regenerate the token immediately

#

I mean delete the image from here lol

vale wing
#

Just regenerate it

frank tartan
quick gust
frank tartan
#

so can someone answer my question?

final iron
#

Can we see the code?

vale wing
#

@frank tartan sorry, but I personally don't know about pycord. In dpy 2.0 and disnake you can overwrite interaction_check method for your class inheriting View

quick gust
#

(please blur the token again while sending ss of code)

vale wing
#

Like

frank tartan
vale wing
#

Forgor

#

!d discord.ui.View.interaction_check

unkempt canyonBOT
#

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

A callback that is called when an interaction happens within the view that checks whether the view should process item callbacks for the interaction.

This is useful to override if, for example, you want to ensure that the interaction author is a given user.

The default implementation of this returns `True`.

Note

If an exception occurs within the body then the check is considered a failure and [`on_error()`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.View.on_error "discord.ui.View.on_error") is called.
vale wing
#

Like this, maybe the same thing is in pycord

quick gust
#

try statements must be followed with an except statement, u have no except statement and so it's giving an error

frank tartan
#

like that?

vale wing
#

Nope lemme show you

#
class CustomViewClass(discord.ui.View):
  ... #init stuff and buttons

  async def interaction_check(self, interaction):
    #this should return True if the interaction author is valid```
vale wing
#

It's not a cog ok

frank tartan
#

but it looks like cogs

quick gust
#

That doesn't require a cog

vale wing
#

It is a class

quick gust
#

Do you know what a cog is?

frank tartan
vale wing
#

Cog is a class but it is a different class lol

frank tartan
quick gust
#

Cogs are just classes as Exenifix said, it's a subclass of commands.Cog and here we are subclassing discord.ui.View

frank tartan
#

ok

vale wing
frank tartan
#
async def msg_reply(interaction):
  await ctx.reply("""
---๐— ๐—ฒ๐˜€๐˜€๐—ฎ๐—ด๐—ฒ ๐—–๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€---

sendMSG <message> - has the bot send a message that you chose.

ssendMSG <message> - sends a message that you choose. (requires manage_messages permission)

msg_button.callback = msg_reply

view = View()
view.add_item(msg_button)

await ctx.send("What commands would you like to view?", view=view)
vale wing
#

Oh lol

vale wing
slate swan
#

i know about buttonspithink

vale wing
#

Buttons gud

slate swan
#

oh it didnt take self

#

fair

vale wing
#

Yeah self missing lol

slate swan
#

yeah yeah, singing channelagenalgnel

#

that return type was wrong how is that optional

slate swan
#

it might return None or the connection

frank tartan
#

ik

slate swan
slate swan
vale wing
#

Follow example

frank tartan
slate swan
#

well you see the else might not execute

#

so the function would return None

#

else it would return the connection.commit()

vale wing
#

!e

print("Most popular" != "Correct one")```
unkempt canyonBOT
#

@vale wing :white_check_mark: Your eval job has completed with return code 0.

True
vale wing
#

Even python bot says troll

slate swan
slate swan
frank tartan
slate swan
slate swan
#

subclassing view is better tbh

vale wing
#

^ and by a lot

slate swan
#

yeah i just did

#

๐Ÿ˜ญ

#

i typehinted the discord.bot object as commands.object lemon_sweat

#

moving on

frank tartan
vale wing
#

Seriously?

slate swan
#

what do you need help with?

vale wing
#

I think they really help

#

Actually I learned that from examples

slate swan
#

yeah i learned from those examples

frank tartan
slate swan
vale wing
#

Now I have my own beautiful subclass that does everything I need

slate swan
#

not better than mine tbh

frank tartan
#

;-;

slate swan
#

LMAO

slate swan
vale wing
slate swan
#

h-how do you live with that shit on the corner at all times

#

i can't wrap my head around it

unkempt canyonBOT
#

Hey @slate swan!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

โ€ข If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

โ€ข If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

slate swan
#

my ocd would never let me

frank tartan
slate swan
frank tartan
#

idc about it, mainly cuz i use multiple screens

slate swan
#

me flexing my windows 11 rn

vale wing
#

I tried to remove it manually but it came back

frank tartan
slate swan
#

alr let's not delve too deep into off topic

vale wing
#

Ok #Win11FlexGang

slate swan
vale wing
#

Looks nice

frank tartan
slate swan
slate swan
slate swan
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'guild_id'

#

what can i do then

frank tartan
#

;-; i came with a question and now i have to re-do everything ;-;

slate swan
#
discord.embed().set_image(url=None)

smh no need to set it on the varpithink

vale wing
#

!d discord.ext.commands.Context.guild

unkempt canyonBOT
vale wing
#

Has id

slate swan
slate swan
frank tartan
vale wing
#

Me with GT 710 notcringebutwtf

slate swan
slate swan
slate swan
frank tartan
#

i learn better from those

slate swan
slate swan
frank tartan
slate swan
slate swan
slate swan
# frank tartan can you link a tutorial on yt?

This is the Ultimate Python Guide on Buttons with Discord.py or Pycord. In this video, I talk about how to create buttons in discord.py or pycord and how to respond to button clicks along with everything about Views. After watching this you'll know everything about Buttons and Views in discord.py or pycord.

This video might also apply to other...

โ–ถ Play video
slate swan
vale wing
#

Does it return the embed itself on call

frank tartan
vale wing
#

Forgor

slate swan
vale wing
#

!d discord.Embed.add_field

unkempt canyonBOT
#

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

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

WOAH

#

IT REALLY RETURNS THE EMBED LMAO

#

Gotta rewrite everything ig

slate swan
frank tartan
slate swan
vale wing
slate swan
#

imagine converting something like this applying their logic

frank tartan
slate swan
#

let him watch the full video

#

looks more better imo

vale wing
#

I mean from 16.00 he tells about subclassing

slate swan
#

lmao you want it to look like

vale wing
#

Fluent-style chaining?

frank tartan
vale wing
#

It is more of javascript and java

slate swan
#
        await interaction.message.edit(embed=discord.Embed(title="Mod helping command", color=Colors.gray).add_field(name="Banning",value=f'{prefix}Ban "{prefix}ban <@{BOTNAME}> reason"\n{prefix}pban `deletes the user messages and ban them` "{prefix}pban <@{BOTNAME}>"\n{prefix}unban "{prefix}unban <@{BOTNAME}>"',inline=False,).add_field(name="kick", value=f'{prefix}kick "{prefix}kick <@{BOTNAME}>"', inline=False).add_field(name="mute",value=f'{prefix}mute "{prefix}mute <@{BOTNAME}>"\n{prefix}unmute "{prefix}unmute <@{BOTNAME}>',
inline=False,).set_thumbnail(url=self.ctx.guild.icon.url))```
vale wing
#

Btw have you ever seen discord bot written on java (it looks very ugly imho)

slate swan
#

imagine writing that

#

imagine not writing that

slate swan
slate swan
vale wing
#

Java itself is good but discord bot written on java is ugly in terms of code

slate swan
vale wing
slate swan
#

kotlin works so well for discord bots though

#

y'all are just used to python

slate swan
slate swan
slate swan
vale wing
#

Language

slate swan
#

not about storage but about style tbh

slate swan
vale wing
#

But in this scale doesn't matter I agree

slate swan
#

holy shit, that is some ugly looking code

velvet tinsel
vale wing
vale wing
#

Idk kotlin tho java only ๐Ÿ’€

velvet tinsel
#

I tried to enroll before realizing I would reveal where I live

#

and that won't look good on my commits

#

I can probably persuade the headmaster to enroll at gunpoin-

slate swan
vale wing
#

unlike jda

hoary cargo
prime marten
#

I made a leaderboard command with sqlite3 and am struggling to make it display the leaderboards per server/guild. Atm it shows a global leaderboard. Does anyone have any knowledge on this?

    async def lb(self, ctx):
        db = sqlite3.connect('kof_db.sqlite')
        cursor = db.cursor()
        cursor.execute(
            f"SELECT member_id, wallet, bank from main ORDER BY bank DESC LIMIT 5 ")
        result = cursor.fetchall()
        embed = discord.Embed(title="Leaderboards", colour=discord.Colour.orange())
        for i, x in enumerate(result, 1):
            embed.add_field(name=f"#{i}", value=f"<@{str(x[0])}> with :moneybag: **{str(x[2])}**",
                            inline=False)
        await ctx.send(embed=embed)
        cursor.close()
        db.close()```
hoary cargo
#

no code no help

vale wing
#

Depends how you store them in your database

#

It is more db related question but let us see anyway

#

@prime marten what the database looks like

prime marten
#

i only recently added the guild_id column so this might be a problem

vale wing
#

Only one table?

prime marten
#

im new to this ๐Ÿฅฒ

slate swan
#

how do you find a tables data like that im not sure

vale wing
#

I mean I store user and member data in separated ones

prime marten
#

hmm

vale wing
#

Quick tip, you can select total funds like this iirc

SELECT wallet+bank AS money ... ORDER BY money DESC```
vale wing
#

Nice

slate swan
#

really

#

real mature

#

oh dang my IDE has a built in database

#

well that makes things easier

limpid thicket
#

Can someone help?

desert heart
#

Why do you want to do it like this though?

limpid thicket
#

Ah so, my ticket command has 4 options. open, close, add and remove with add and remove both accepting a discord.Member object while open and close don't however if you add another argument to the open and close, since they are all part of the same command (which is what I wanted), it errors because it isn't a discord.Member when I preferably just want it to ignore that argument since it's not required for those two.

#

I mean unless there is a way around this? But I've just had no clue, only thing I could come up with.

desert heart
#

yeah there is a better way. sounds like you want to have subcommands

limpid thicket
#

How can I do that?

#

Atm I'm using arguments and if statements.

desert heart
#

Make a command group, and then add commands to that group

slate swan
#

hello i have a problem this is the code:

import discord
from discord.ext import commands
import test

cogs = [test]
client = commands.Bot(command_prefix ='!m',intents = discord.Intents.all())
for i in range(len(cogs)):
  cogs[i].setup()



client.run("TOKEN")```
This is the error
```Traceback (most recent call last):
  File "main.py", line 6, in <module>
    client = commands.Bot(command_prefix ='!m',intents = discord.Intents.all())
AttributeError: module 'discord' has no attribute 'Intents'```
#

discord is somehow undefined

#

idk how

#

import intents

slate swan
#
from discord import Intents
desert heart
limpid thicket
slate swan
#

what are command groups for?

desert heart
#

For nesting commands

slate swan
#

ah ic ty

desert heart
#

Try updating it

slate swan
desert heart
#

Is it not possible to update dependencies on replit?

slate swan
desert heart
#

Do print(discord.__version__) what is it?

slate swan
#

wait replit is so dog water that my system crashed for stopping the program

#

but free host

slate swan
#

and i still have the same error

desert heart
#

I don't know. That doesn't make sense.

slate swan
#

i tried running it a couple of times

#

but same thing

vale wing
#

@slate swan check these files maybe you should edit them, haven't ever used replit but seems like the issue is there

vale wing
#

Wrong dependency version for example

#

Here's how I have it

slate swan
#

ooooo ok

vale wing
#

Also here

slate swan
#

ok

#
@bot.event
async def on_message_delete(ctx):
    embed=discord.Embed(title="{} deleted a message".format(ctx.author))
    embed.add_field(name="What the message was goes here" ,value=f"{ctx.message.content}", inline=True)
    channel=bot.get_channel(930546282097938492)

    await channel.send(channel, embed=embed)
Ignoring exception in on_message_delete
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "D:python\Logs\bot.py", line 24, in on_message_delete
    embed.add_field(name="What the message was goes here" ,value=f"{ctx.message.content}", inline=True)
AttributeError: 'Message' object has no attribute 'message'

help?

vale wing
#

!d discord.on_message_delete

unkempt canyonBOT
#

discord.on_message_delete(message)```
Called when a message is deleted. If the message is not found in the internal message cache, then this event will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.

If this occurs increase the [`max_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") parameter or use the [`on_raw_message_delete()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_message_delete "discord.on_raw_message_delete") event instead.

This requires [`Intents.messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.messages "discord.Intents.messages") to be enabled.
vale wing
#

Argument parsed is not a context

#

It's already a Message

#

@slate swan ^

slate swan
slate swan
#

how do put the member avatar from above in the title ?
as in the screenshot?

vale wing
#

!d discord.Embed.set_author

unkempt canyonBOT
#

set_author(*, name, url=Embed.Empty, icon_url=Embed.Empty)```
Sets the author for the embed content.

This function returns the class instance to allow for fluent-style chaining.
slate swan
shut leaf
#

guys

#

can someone help me

#

i am still a beginner

slate swan
#

with?

shut leaf
full lily
#

else needs to allign with if above it

#

@shut leaf

slate swan
#

!indents

unkempt canyonBOT
#

Indentation

Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.

Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.

Example

def foo():
    bar = 'baz'  # indented one level
    if bar == 'baz':
        print('ham')  # indented two levels
    return bar  # indented one level

The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.

Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines

More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation

cold sonnet
#

music bots

#

smh

full lily
#

^^

slate swan
unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

limpid thicket
#

With sub commands I would have to define a function 4 times right? I can't like make it so the function is accessible by all 4 sub commands without being fully global.

jade tartan
full lily
#

I'm not sure of any scenarion where you would need to define the same func 4 times

limpid thicket
#

I used to use the method of creating subcommands via a single @client.command() and if statements from the arguments passed however since the subcommands are each in their own function async def sub_command(ctx): for example, I wouldn't be able for all the sub commands to use the same function will I and that's without making it completely global for the whole code.

full lily
#

I don't really know what you mean

#

you wanted to invoke a subcommand from the main command?

#

there's a commands.group decorator too, for making commands and subcommands, by the way

cloud dawn
#

In Disnake params would it be possible to disallow certain characters?

full lily
cloud dawn
full lily
#

ping me if you're stuck

cloud dawn
#

๐Ÿ‘

small igloo
#

so ```py
@bot.command()
async def whatServer(ctx):
id = ctx.author.id
if id == 828182019841327115:
le = len(list(bot.guilds))
em = discord.Embed(title="servers", description="", colour=ctx.author.color)
re = list(bot.guilds)
for i in range (le):
em.add_field(name=str(i),value=re[i]["name"],inline=False)
await ctx.send(embed=em)

anything wrong in my code?
small igloo
# shut leaf

ok, u break ||kinda|| yt law (YTDL), but just add some space before "else"

slate swan
slate swan
#

lol

cinder breach
small igloo
# cinder breach can you post the full traceback
Ignoring exception in on_command_error
Traceback (most recent call last):
  File "C:\Users\thosiba\Downloads\d-bots\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\thosiba\PycharmProjects\main.py\main.py", line 119, in whatServer
    em.add_field(name=str(i),value=re[i]["name"],inline=False)
TypeError: 'Guild' object is not subscriptable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\thosiba\Downloads\d-bots\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\thosiba\PycharmProjects\main.py\main.py", line 53, in on_command_error
    raise error
  File "C:\Users\thosiba\Downloads\d-bots\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\thosiba\Downloads\d-bots\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\thosiba\Downloads\d-bots\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'Guild' object is not subscriptable
cloud dawn
#

@full lily Not possible :( Discord API only allows certain types so no custom checks to deny them from using the slash command. You can manipulate the outcome with the converter but what they inputted will still be send since it does count as a string.

cinder breach
full lily
full lily
#

OH

#

a slash command!?

cloud dawn
cloud dawn
#

I got a regular check now with regex

#

But I want their Discord to shake with shame if them inputting it wrong.

full lily
#

I've no clue abt slash commands

#

What's the issue though?

cloud dawn
#

Converter was worth the try though

full lily
#

So the command will have to go through either way, but you can tell the command what to do with the arguments

full lily
#

does this work?

cloud dawn
cloud dawn
full lily
#

So what did you want to do different then

long rock
#

how to fix discord http generator

final iron
cloud dawn
#

It's not broken i was just looking to enhance it :3

long rock
cloud dawn
long rock
final iron
cloud dawn
#

The heck is that

final iron
#

Just send your issue here

#

And we can help you

long rock
#

aight

cloud dawn
#

Aren't proxies like 127.0.0.1

final iron
#

idk

long rock
#

~~Traceback (most recent call last): File "C:\Users\home\Desktop\DiscordHTTPGen-main\main.py", line 1, in <module> from hcapbypass import bypass File "C:\Users\home\Desktop\DiscordHTTPGen-main\hcapbypass.py", line 4, in <module> import httpx ModuleNotFoundError: No module named 'httpx'~~

final iron
#

No.

#

!rule 5

unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

long rock
#

ok

cloud dawn
#

Why are people abusing Discord pithink

final iron
slate swan
#

๐Ÿคท๐Ÿพthats the only reason ig

cloud dawn
daring olive
#

@long rockhi, since we don't allow help on projects like this (see rule 5 above), will be closing this thread

slate swan
cloud dawn
#

Mina :3
How've you been?

green bluff
#
async def stat(reason):
    r = requests.get(f"https://api.hypixel.net/player?uuid={reason}&key=0f4686d5-5696-4b6e-843e-79932a76fbdc", headers={'content-type': 'application/json'})
    print('line one called')
    print(r.json()["player"]["lastLogin"])```
daring olive
#

oh wait

final iron
cloud dawn
hoary cargo
green bluff
#

what is aiio http

cloud dawn
#

Mina casually deletes discord bots

final iron
#

Use aiohttp

unkempt canyonBOT
green bluff
#

do i just do import

final iron
#

Actually

green bluff
final iron
#

Then import it

green bluff
#

done

#

now where do i use it

final iron
#

Instead of requests

crisp bloom
#

hey guys I am having a trouble with my bot again

crisp bloom
#

why doesnt this work? it should delete messages if they are all caps

final iron
#

Basically anywhere you have requests, you should replace it with aiohttp

crisp bloom
#

it used to work but doesnt anymore

green bluff
#

oh okay

#

thanks lemme try run

slate swan
slate swan
green bluff
final iron
#

!d str.isupper

unkempt canyonBOT
#

str.isupper()```
Return `True` if all cased characters [4](https://docs.python.org/3/library/stdtypes.html#id15) in the string are uppercase and there is at least one cased character, `False` otherwise.

```py
>>> 'BANANA'.isupper()
True
>>> 'banana'.isupper()
False
>>> 'baNana'.isupper()
False
>>> ' '.isupper()
False
cloud dawn
slate swan
#

ah ic

final iron
slate swan
green bluff
#

uhh i didnt get any response from the bot

slate swan
# green bluff

Mmm try message.content.isupper() == True since isupper returns a bool

green bluff
#

changed code to this

slate swan
#

For @crisp bloom

cloud dawn
crisp bloom
slate swan
cloud dawn
#

!e ```py
if "TEST".isupper():
print('true :3')

unkempt canyonBOT
#

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

true :3
cloud dawn
slate swan
cloud dawn
slate swan
cloud dawn
#

Even if i was working on my phone i would work on my vps

slate swan
#

!e ```py
if "TEST".isupper() == True:
print('test')

unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

test
cloud dawn
slate swan
final iron
slate swan
#

!e ```py
if "TEST".isupper() == False:
print('test')
else:
print("sks")

unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

sks
slate swan
#

it works ๐Ÿ’€

cloud dawn
unkempt canyonBOT
#

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

Doesnt matter
slate swan
#

!e

if True == True:
    print("yes")
unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

yes
slate swan
cloud dawn
#

!e ```py
if False == False: print(bool("yes"))

unkempt canyonBOT
#

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

True
cloud dawn
#

I think you got the point lol

quaint epoch
#

how do i check when the bot closes?

slate swan
#

Ig

cloud dawn
quaint epoch
#

like py @bot.event async def on_close(): print("bot_closed")

#

like when i stop the program or do await bot.close()

slate swan
#

I've been trying and looking for a while on how to make a ticket system using buttons in discord.py without cogs havn't been able to figure it out. if anyone does lmk or dm me plz

cloud dawn
#

!d disnake.on_disconnect

unkempt canyonBOT
#

disnake.on_disconnect()```
Called when the client has disconnected from Discord, or a connection attempt to Discord has failed. This could happen either through the internet being disconnected, explicit calls to close, or Discord terminating the connection one way or the other.

This function can be called many times without a corresponding [`on_connect()`](https://docs.disnake.dev/en/latest/api.html#disnake.on_connect "disnake.on_connect") call.
quaint epoch
cloud dawn
#

!d discord.on_disconnect

unkempt canyonBOT
#

discord.on_disconnect()```
Called when the client has disconnected from Discord, or a connection attempt to Discord has failed. This could happen either through the internet being disconnected, explicit calls to close, or Discord terminating the connection one way or the other.

This function can be called many times without a corresponding [`on_connect()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_connect "discord.on_connect") call.
cloud dawn
#

Same story

cloud dawn
green bluff
#

can so,meone help me

#

1st line is getting called

#

second line isnt

#

and when i just do print(r.json()) it returns with malformed uuid

slate swan
#

add ctx before reason

#

async def stat(ctx, reason)

green bluff
#

okay sure

#

also i had to go to sleep yesterday so thats why i didnt respond if u tried to reach me

#

but ctx is not accesed by pylance

#

should i do await ctx.send

slate swan
#

what?

#

i'm telling you to add context to the list of arguments on the function definition

#

otherwise you're passing ctx as reason and your request returns "malformed UUID" because of that

green bluff
#

?

slate swan
#

that's what you want, isn't it?

green bluff
#

nope

slate swan
#

that's an unix timestamp

wary zenith
#

someone know how to make a bot send an email

slate swan
#

it's written in your code though

green bluff
#

how do i split that into time

#

like how do i make that into readable time

tulip oracle
#

my discord bots ping is 0.04 but is stupidly slow. will this be a problem with my host?

slate swan
#

use the datetime module with utcfromtimestamp and strftime

cloud dawn
slate swan
#

ah shit I gotta go to the bathroom

slate swan
green bluff
slate swan
slate swan
#

have a good one tho lol

#

<t:18638:d>

tulip oracle
cloud dawn
#

<t:1641889126926:R>

tulip oracle
cloud dawn
green bluff
#

@cloud dawn

green bluff
#

theres an eroor

#

error

#

oh wait

slate swan
green bluff
#

that was baby criminal oops

slate swan
#

And

green bluff
#

ye removed the 2 fs

slate swan
#

Add {}

#

๐Ÿ’€

green bluff
#

where to the player and ;ast login

slate swan
#

like this print(f"<t:{r.jaon()["player"]["lastlogin"] }:d>")

slate swan
green bluff
#

should i try it

final iron
# green bluff

Use aiohttp unless you want your bot freezing when someone runs the command

cloud dawn
wary zenith
final iron
green bluff
#

no i tried it

final iron
#

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

green bluff
#

bot didnt respond

#

with anything

final iron
slate swan
cloud dawn
green bluff
#

no @slate swan just that year is wrong

wary zenith
#

that has nothing to do with how to make a bot that sends emails

green bluff
#

how do i fix that

cloud dawn
wary zenith
#
@client.command()
async def email(ctx, sender, recipient, subject, *, body):
  global address, password
  if "`" in body:
    body = body.strip("`")
  message = MIMEMultipart()
  message["From"] = sender
  message["To"] = recipient
  message["Subject"] = subject
  message.attach(MIMEText(body, 'plain'))
  address = sender
  dm = await ctx.author.create_dm()
  await dm.send("Send me the password for your email.")
  msg = await client.wait_for("message", check=lambda m: m.channel.type == discord.ChannelType.private)
  password = str(msg.content)

  embed = discord.Embed(title=f"From: {sender}", discription=f"""To: {recipient}
  Subject: {subject}
  Body: 
  {body}""", color = discord.Color.blue())
  await ctx.send(embed=embed)
slate swan
green bluff
unkempt canyonBOT
#

When adding functions or classes to a program, it can be tempting to reference inaccessible variables by declaring them as global. Doing this can result in code that is harder to read, debug and test. Instead of using globals, pass variables or objects as parameters and receive return values.

Instead of writing

def update_score():
    global score, roll
    score = score + roll
update_score()

do this instead

def update_score(score, roll):
    return score + roll
score = update_score(score, roll)

For in-depth explanations on why global variables are bad news in a variety of situations, see this Stack Overflow answer.

final iron
green bluff
#

Alright just tell me who should i listen top

#

3 ppl are helping me

final iron
green bluff
#

i will listen to u the whole way

#

ok then

#

do u want me to change it back to aiohttp

#

current code

cloud dawn
unkempt canyonBOT
#

Why do we need asynchronous programming?
Imagine that you're coding a Discord bot and every time somebody uses a command, you need to get some information from a database. But there's a catch: the database servers are acting up today and take a whole 10 seconds to respond. If you do not use asynchronous methods, your whole bot will stop running until it gets a response from the database. How do you fix this? Asynchronous programming.

What is asynchronous programming?
An asynchronous program utilises the async and await keywords. An asynchronous program pauses what it's doing and does something else whilst it waits for some third-party service to complete whatever it's supposed to do. Any code within an async context manager or function marked with the await keyword indicates to Python, that whilst this operation is being completed, it can do something else. For example:

import discord

# Bunch of bot code

async def ping(ctx):
    await ctx.send("Pong!")

What does the term "blocking" mean?
A blocking operation is wherever you do something without awaiting it. This tells Python that this step must be completed before it can do anything else. Common examples of blocking operations, as simple as they may seem, include: outputting text, adding two numbers and appending an item onto a list. Most common Python libraries have an asynchronous version available to use in asynchronous contexts.

async libraries
The standard async library - asyncio
Asynchronous web requests - aiohttp
Talking to PostgreSQL asynchronously - asyncpg
MongoDB interactions asynchronously - motor
Check out this list for even more!

wary zenith
cloud dawn
final iron
green bluff
#

no ill reset it ofc

wary zenith
green bluff
#

anyways the api key literally comes with no powers except from veiwing stats

#

u cant really do much

cloud dawn
green bluff
#

with that key

wary zenith
#

its just for me and my friends

#

and its a dm

cloud dawn
wary zenith
#

pls no fbi

slate swan
cloud dawn
#

attack

final iron
slate swan
green bluff
#

ik ill reset it

final iron
#

There is most likely a punishment for spamming requests

green bluff
#

spamming reqs?

cloud dawn
slate swan
cloud dawn
final iron
green bluff
#

if u really want me to reset it ill do that but anything else u can help me with

cloud dawn
slate swan
#

Imma search up for motor docs๐Ÿ˜ญ

wary zenith
cloud dawn
unkempt canyonBOT
cloud dawn
#

Non-blocking MongoDB driver :3

cloud dawn
slate swan
deep torrent
#

Should I ask for help with discord bots here or go to a help channel?

slate swan
#

here

vast gale
#

@slate swan did you sleep

deep torrent
#

Okay, so I was wondering if there is a way to change everyone's nickname on the server all at once but choosing a random name from a txt file

final iron
#

Oh seems like I accidentally entered the wrong class

green bluff
#
async def stat(ctx, reason):
    r = requests.get(f"https://api.hypixel.net/player?uuid={reason}&key=api", headers={'content-type': 'application/json'})
    await ctx.send(f'<t:{r.json()["player"]["lastLogin"]}:d>')```
slate swan
final iron
#

This is how to get rate limited 101

green bluff
#

there reset it

final iron
#

I should be in cogs

green bluff
#

can u pls help now

final iron
#

๐Ÿšถ

vast gale
slate swan
vast gale
#

I slept for 3 or so hours

final iron
green bluff
#

im using disnake is that a wrapper

final iron
vast gale
deep torrent
slate swan
slate swan
green bluff
#

im not using any hypixel wrapper

final iron
#

No offense to them but this seems complicated for them

#

imo it would be simpler to just use a wrapper

vast gale
#

well if you know of a wrapper it's possible to compare... but otherwise..

deep torrent
slate swan
green bluff
#

which wrapper should i use then

green bluff
#

so do pip install the wrapper

final iron
#

Yes

green bluff
#

arkflame72/asyncpixel* Lightweight. One commit in the last 30 days.
Snuggle/hypixel.py No commits in 2 months.
SomePr0grammer/aHypixel
Kanin/PyPixel No commits in 11 months.
MyerFire/hypixelaPY No commits in 3 months.
xMicky24GIT/pyhypixel No commits in 13 months.
TheLegendOfKitty/snakepixel-beta No commits in 7 months.
SlashNephy/Hypixthon**r these the python wrappers

slate swan
#

isinstance will check if both objects are of the same type, so your check here will always return true

green bluff
#

install one of thesse?

final iron
green bluff
#

so do i get the darkflame one

slate swan
#

you can just do return ctx.channel == channel

green bluff
#

but what is it called

#

what do i pip install

#

ill just follow the link

slate swan
#

!pypi asyncpixel

unkempt canyonBOT
slate swan
#

@final iron you're probably just getting him into more trouble with this wrapper, it's async and he will need to adapt for that

green bluff
#

done

#

do i need to import it

slate swan
green bluff
#

wait but whats wrong with my current code

#

it says the date

final iron
green bluff
#

the date is slightly wrong tho

final iron
#

How wrong?

slate swan
green bluff
#

very wrong but when i hover my mouse over it its the right date

wary zenith
#

what do i do with this

green bluff
#

the time is right

slate swan
#

the one converting that unix timestamp to a date is discord, you can't control it

wary zenith
#

you cant

#

i dont think atleast

final iron
#

Did you leak your key again?

green bluff
#

omg

wary zenith
#

ur done ๐Ÿคฃ

green bluff
#

just pls tell me whats worng

slate swan
final iron
#

๐Ÿง

vast gale
#

the Unix time needs to be in scale with 1/1/1970

wary zenith
#

epoch iirc

vast gale
#

that's how discord calculates those

#

yep

slate swan
#

i'm not sure what's wrong then

slate swan
green bluff
#

bruh why does this always happen to me

#

it even happened to my giveaway command never responded till like an hour of fixing

wary zenith
#

google loves to bother me

#

let my program work pls

#

you literally are meant to work with this api

#

yk what, i should stop trying to do this.

#

i feel like im gonna lock myself out of my account

tulip oracle
#

my ping is averaging at around 500ms

#

my host averaging at around 14ms

#

is there a solid way to fix. or possible reasons for delayed response. other than discord api being globally slow

slate swan
#

maybe your wifi is slow

wary zenith
#

my ms isnt that high

slate swan
#

it really depends on allot of stuff

wary zenith
#

and i have terrible wifi

tulip oracle
#

im pretty sure it doesnt depend on personal wifi

wary zenith
#

any game i join has at the very least 500 ping

tulip oracle
#

and my wifi isnt slow

slate swan
#

why wouldnt

tulip oracle
#

ok what would you consider slow wifi enough to affect my bots ping?

#

just because this is slowest ive seen it for about 3 years

wary zenith
#

yep

#

you said 3 years

tulip oracle
#

i dont host this bot my self though. it is slow in response no matter who uses a command

wary zenith
#

you probably have a pretty big bot

#

and is your wrapper async?

tulip oracle
#

of course

wary zenith
#

which statement are you refering too

#

to*

tulip oracle
#

well both is true

#

big in terms of loops and events and command usage

slate swan
wary zenith
tulip oracle
#

no its only for a 14k server

wary zenith
#

14k is quite a bit

#

also the amount of code you have in your program can cause it to move slower than usual

tulip oracle
#

the host isnt a problem as i said the server is averaging a 14ms response time

wary zenith
#

also if you are opening a bunch of webpages over and over again

tulip oracle
#

one cog file has 3k or so lines of code

#

webpages no there is a few api requests looped per second

#

not to discord*

slate swan
tulip oracle
#

na i dont use heroku

#

but yeah server isnt a problem

stark lintel
#

i got an odd question for someone good with APIs

slate swan
stark lintel
slate swan
#

then send it

stark lintel
#

Ill explain after dinner

drifting arrow
#

Who do I speak to about suggesting another bot hosting service?

#

to add to the list

green bluff
green bluff
#

o ok

drifting arrow
#

I found a bot hosting service that's not on the list and want to suggest it be added to said list

green bluff
#

what list

drifting arrow
green bluff
#

ah

weary mirage
#

how do I write exceptions for errors?

#

like if somebody is missing a role

slate swan
#

usually

wary zenith
#

ok

green bluff
#

a game

#

r u sure its like 1.2 k ping

fickle onyx
#

I imagine that discord and its bots can handle utf-8 characters right?

sage otter
#

yes. that do be the standard for most platforms.

drifting arrow
#

pebblehost

#

I've been using it for a few weeks for my bot and it's quite reliable and fast so far

sage otter
#

Is it a vps or something?

#

Or is it just some panel you get to upload files onto and what not.

drifting arrow
#

Not a VPS. Just a panel to upload bots. it has a few features like MySQL etc

#

i can send screenshots if you want to look?

pliant gulch
#

inb4 Pterodactyl panel

sage otter
#

Thatโ€™s probably what it is tbh.

drifting arrow
#

idk what that is @pliant gulch

#

Yes I googled it @pliant gulch and yes

pliant gulch
#

Called it