#discord-bots

1 messages · Page 1076 of 1

robust fulcrum
#

Me send you all code see once

shrewd apex
#

it will load all py files from commando

robust fulcrum
loud junco
shrewd apex
#

welp then its a error in one of your cogs

loud junco
#

why is it none type

shrewd apex
#

not in loading them

loud junco
shrewd apex
#

in commando.area

robust fulcrum
#

Use any other way ig?

loud junco
shrewd apex
#

lemme see

loud junco
#
from discord.ext import commands
import discord
from progress.stats import *

class Area(commands.Cog):
  def __init__(self, bot):
    self.bot = bot

  @commands.command()
  @commands.cooldown(1, 1, commands.BucketType.user)
  async def area(self, ctx, arg: int):
    try:
      stats = Stats(ctx)
      if 1 <= arg <= 14:
        if arg <= stats.highestArea:
          db[stats.userid + 'area'] = arg
          await ctx.send(f'**{ctx.author.name}** has moved to **AREA {arg}**')
        else:
          await ctx.send(f'**{ctx.author.name}** fight more bosses to unlock this area :D')
      else:
        await ctx.send('404 area not found')
    except KeyError: #error handler
      await ctx.send(f'**{ctx.author.name}**, your account is either not created yet or not at the latest version. Try using `rpm start`')
      
def setup(bot):
    bot.add_cog(Area(bot))
shrewd apex
#
def setup(bot):
    bot.add_cog(Area(bot))
``` this is the problem
robust fulcrum
loud junco
#

await?

#

or self.bot

robust fulcrum
#

Async def

shrewd apex
#
async def setup(bot):
    await bot.add_cog(Area(bot))
loud junco
#

ok

robust fulcrum
#

I also got this error first

shrewd apex
#

in what u sent rn

robust fulcrum
#

Hmm?

shrewd apex
#
import discord
from discord.ext import commands

class anime():
    def __init__(self, bot):
        self.bot = bot
    
    @commands.command()
    async def pie(self ,ctx):
        initial = 1
        cars = []
        await ctx.send("enter number of labels")

        def check(msg):
             return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

        nov =  await bot.wait_for('message', check=check,timeout=5)
        while initials<=nov:
            await ctx.send("enter the value of pie chart to append")
            apens = await bot.wait_for('message', check=check,timeout=5)
            cars.append(apens)
            initials += 1
        await ctx.send(cars)
    
def setup(bot):
    bot.add_cog(anime(bot))
robust fulcrum
#

It's working anyway

shrewd apex
#

urs 👆 it wont in 2.0

slate swan
shrewd apex
#

not mine

robust fulcrum
#

Not his it's mine code...

#

Just a time wasting code

shrewd apex
robust fulcrum
#

Me making a pie chart command

#

So i can make pie charts using command

shrewd apex
#

why dont u do that with matplotlib

robust fulcrum
#

It was just a demo code cause i need

robust fulcrum
#

Now me converting it to command

#

But me getting errors

shrewd apex
#

ok...

robust fulcrum
#

Replit is fool

shrewd apex
shrewd apex
robust fulcrum
#

Me on Android no better option

shrewd apex
#

ur code had the errors how is it replits prob?

robust fulcrum
#

But it should atleasts show tabs

loud junco
shrewd apex
robust fulcrum
#

Hmmm big problem

shrewd apex
#

hmm

shrewd apex
robust fulcrum
#

Still me getting errors

import discord
from discord.ext import commands

def check(msg):
  return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

class anime():
    def __init__(self, bot):
        self.bot = bot
	
	@commands.command()
	async def pie(self ,ctx):
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nov =  await bot.wait_for('message', check=check,timeout=5)
		while initials<=nop:
			await ctx.send("enter the value of pie chart to append")
			apens = await bot.wait_for('message', check=check,timeout=5)
			data.append(apens)
			initials = int(initials+1)
		await ctx.send(cars)
	
async def setup(bot):
    await bot.add_cog(anime(bot))
shrewd apex
#

nop not defined data not defined

robust fulcrum
#

I think me need big Brian

robust fulcrum
shrewd apex
#

which line is it giving indent error

robust fulcrum
#

@commands.command() line

shrewd apex
#

Anime(commands.Cog)

robust fulcrum
#

Indentation problem fixed!

#

But now a new error came

#

It's says cogs must derive from cog

slate swan
#

class anime(commands.Cog)

shrewd apex
#

didnt i say the samepithink

slate swan
#

you have many bugs inside the pie function as well, like direct usage of bot variable

slate swan
shrewd apex
#

maybe i wasnt clear

robust fulcrum
#

await bot.wait_for('message', check=check,timeout=5)
Guys i getting error
It's says bot is not defined

slate swan
#

ctx.bot or self.bot is your deal

robust fulcrum
slate swan
#

yeap

robust fulcrum
#

Ok

#

Ty

slate swan
shrewd apex
#

🤣

jaunty venture
#

can anyone tell what does commands.BucketType mean i googled it but some stack overflow answers popped up

slate swan
unkempt canyonBOT
slate swan
#

its mostly used as a cooldown specifier, as mentioned

maiden fable
#

Imagine discord not sending my message

robust fulcrum
#

Me getting this error now

slate swan
#

work*

maiden fable
#

Uh, yea that

slate swan
jaunty venture
slate swan
#

hunter's smort

jaunty venture
maiden fable
#

I just know what he wanted. I have also had the same issue when I just started with cooldowns since I never understood how they worked

slate swan
#

weird

robust fulcrum
shrewd apex
slate swan
slate swan
shrewd apex
#

error is as it says ctx is not defined if u want to put check outside u have to pass ctx as parameter

shrewd apex
#

pi or pie?

slate swan
#

and, sarthak's smort and funny too

#

pi is an mathematical expression, pie is an eatable

shrewd apex
#

ik 🥲

slate swan
#

😔 why would someone ask to make a pi

warped mirage
#

Damn it’s so funny that I’m still not done with my wm system lol

slate swan
shrewd apex
#

he was making a pie command...

slate swan
shrewd apex
slate swan
shrewd apex
maiden fable
#

And stop this convo before I make y'all start hating me, by running the ot command

dry quiver
#
How do I make my  bot to  respond to other bots?```
slate swan
#

depends if its a comamnd or an event

shrewd apex
maiden fable
#

Huh

maiden fable
slate swan
slate swan
slate swan
#

Imagine if there was a premium version of discord library.

#

counterfeition exists

maiden fable
dry quiver
slate swan
slate swan
dry quiver
#

@shrewd apex can you send me code example?

slate swan
shrewd apex
maiden fable
#

Process commands in 1.7 too @slate swan

slate swan
#

they just move if if message.author.bot line in that method

shrewd apex
#
@bot.event
async def on_message(message):
    if message.author.id == bot.user:
          #stuff
#

oops habit from help channel

slate swan
#

bot undefined

#

nvm

slate swan
# maiden fable Process commands in 1.7 too <@456226577798135808>

1.7.3 ->

async def on_message(self, message):
   if message.author.bot: return
   await self.process_commands(message)
``` 2.0 ->
```py
async def process_command(self, message):
   if message.author.bot: return

async def on_message(self, message):
    await self.process_commands(message)
#

they now check the bot condition in different method

steep estuary
#

how to get the server profile picture of a user in discord.py ?

maiden fable
#

What the

robust fulcrum
#
import discord
from discord.ext import commands

def check(msg):
  return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

class pie(commands.Cog):
	def __init__(self, bot):
		self.bot = bot
	def check(msg):
		return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

    
	@commands.command()
	async def pie(self ,ctx):
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nov =  await self.bot.wait_for('message', check=check,timeout=5)
		while initials<=nop:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=5)
			data.append(apens)
			initials = int(initials+1)
		await ctx.send(cars)
	
async def setup(bot):
    await bot.add_cog(pie(bot))

Is it correct now?

slate swan
slate swan
maiden fable
unkempt canyonBOT
#

property display_avatar```
Returns the member’s display avatar.

For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.

New in version 2.0.
dry quiver
#

@shrewd apex

slate swan
shrewd apex
#

no it doesn't

robust fulcrum
slate swan
#

How can I get members from all of the guilds my bot is in?

steep estuary
#

oh display_avatar

shrewd apex
maiden fable
unkempt canyonBOT
slate swan
dry quiver
slate swan
maiden fable
#

!d discord.Client.guilds is also there @slate swan

unkempt canyonBOT
robust fulcrum
#

	@commands.command()
	async def pie(self ,ctx):
		def check(msg):
			return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nov =  await self.bot.wait_for('message', check=check,timeout=5)
		while initials<=nop:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=5)
			data.append(apens)
			initials = int(initials+1)
		await ctx.send(cars)

Now?

slate swan
maiden fable
slate swan
#

!d discord.Client.get_all_members

shrewd apex
#

ping when reply dosent mean u keep pinging me every messagepithink

maiden fable
maiden fable
#

Nvm

slate swan
shrewd apex
robust fulcrum
#

Ok

maiden fable
maiden fable
#

Thought so

slate swan
#

but whats the sum for

#

how would that list comp work?

dry quiver
#

I want to write a bot that deletes a roll from another server when I use command in another server

#

what should i do?

maiden fable
slate swan
#

x.members will return a list of member objects

#

so....how

dry quiver
shrewd apex
slate swan
#
members= []
[members.extend(g.members) for g in bot.guilds]
``` seems noicee
slate swan
#

and the bot should ne in both the servers

robust fulcrum
slate swan
#

ill go to sleep now good night

robust fulcrum
#

Gn

#

😴

shrewd apex
slate swan
#

gunnite Ashley

jaunty venture
dry quiver
robust fulcrum
shrewd apex
robust fulcrum
#

Oof

maiden fable
dry quiver
#

can i use it with name?
can you send me code example?
@shrewd apex

slate swan
slate swan
wet crystal
#

How can I have my !help command not returning a error when arguments are missing, so that I can have for example !help commands and then send a message which shows help for all commands and then also commands like !help moderation, etc

robust fulcrum
#

Done!

slate swan
#

subclass the HelpCommand class

slate swan
shrewd apex
warped mirage
#

Damn

dry quiver
slate swan
dry quiver
shrewd apex
#

!d discord.utils.get

unkempt canyonBOT
#

discord.utils.get(iterable, /, **attrs)```
A helper that returns the first element in the iterable that meets all the traits passed in `attrs`. This is an alternative for [`find()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.utils.find "discord.utils.find").

When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.

To have a nested attribute search (i.e. search by `x.y`) then pass in `x__y` as the keyword argument.

If nothing is found that matches the attributes passed, then `None` is returned.

Changed in version 2.0: The `iterable` parameter is now positional-only.

Changed in version 2.0: The `iterable` parameter supports [asynchronous iterable](https://docs.python.org/3/glossary.html#term-asynchronous-iterable "(in Python v3.10)")s...
wet crystal
jaunty venture
slate swan
shrewd apex
#

use it with ctx.guild.roles

#

and name=role_name

slate swan
#

noooo

wet crystal
#

Anyone?

How can I have my !help command not returning a error when arguments are missing, so that I can have for example !help commands and then send a message which shows help for all commands and then also commands like !help moderation, etc

slate swan
#

the role is from another server

shrewd apex
#

so fetch the guild object by id

#

it was an example ur bot should be in that guild to delete it tho and have perms

modern fiber
#

yo guys, my free dyno hours on Heroku are out. wha dot I do now?

vocal plover
shrewd apex
unkempt canyonBOT
#

class discord.ext.commands.HelpCommand(*args, **kwargs)```
The base implementation for help command formatting.

Note

Internally instances of this class are deep copied every time the command itself is invoked to prevent a race condition mentioned in [GH-2123](https://github.com/Rapptz/discord.py/issues/2123).

This means that relying on the state of this class to be the same between command invocations would not work as expected.
dry quiver
shrewd apex
dry quiver
#

@shrewd apex

shrewd apex
#

read above ☝️

modern fiber
shrewd apex
modern fiber
#

make another account? eh

shrewd apex
slate swan
shrewd apex
#

and run on that

dry quiver
slate swan
#

just shorten the code to @shrewd apex @dry quiver
bot.http.delete_role(server_id, role_id) thank me later

modern fiber
#

Tomorrow is new month isnt it..

shrewd apex
#

yeah

modern fiber
#

damn ty bro love you so much

modern fiber
# shrewd apex yeah

so will it just start by itself or should I do git push heroku master again

wet crystal
shrewd apex
#

they just scale the dyno to 0 and stop the process

slate swan
#

You would have to use utils.get to get the role first
but since you're doing that, just use the normal way of deleting role then

shrewd apex
modern fiber
shrewd apex
#

lmao i seriously should be studying for maths now...

slate swan
#

legend

#

time to tease

wet crystal
maiden fable
shrewd apex
maiden fable
shrewd apex
maiden fable
#

Ah

maiden fable
#

I alwYs procrastinate doing those lmao

slate swan
dry quiver
#

whats problem?

slate swan
#

To dm a user what should I use in this code?
async def fm(member): await member.send(“hello”)

shrewd apex
#

await bot.http

maiden fable
shrewd apex
#

then send

slate swan
#

how ?

#

member.create.DMchannel?

maiden fable
slate swan
slate swan
dry quiver
shrewd apex
maiden fable
slate swan
maiden fable
#

(if I ain't talking about the wrong one)

slate swan
dry quiver
maiden fable
shrewd apex
slate swan
#

but
It didn’t dm a user it should

shrewd apex
#

channel = user.dmchannel
await channel.send()

#

something along those lines

slate swan
#

you can just user.send too

maiden fable
slate swan
dry quiver
#

how to find role id by role name

shrewd apex
#

did u fetch or get the member object

dry quiver
#

???????

maiden fable
slate swan
shrewd apex
dry quiver
shrewd apex
slate swan
#

I got a full event

#

I sent only the 3 lines

#

Out of 5

#

2*

unkempt canyonBOT
#

discord/guild.py line 1030

def get_member_named(self, name: str, /) -> Optional[Member]:```
maiden fable
steep estuary
random girder
#

hello, do you know how to start a python script from a command ?

slate swan
shrewd apex
slate swan
shrewd apex
#

than how did u know pithink

maiden fable
slate swan
#

yeah maybe

steep estuary
maiden fable
#

Intents

#

Prolly Members intent

slate swan
#
        @commands.Cog.listener('on_member_remove')
        @commands.guild_only()
        async def fm(member):
            await member.ban(reason="User Left While Freeloader Mode Was On.")
            await member.send(f"`Whoops you left {member.guild.name} while they had freeloader mode enabled, now you've been banned permanently. You can appeal this ban in BA server.")
``` full code ^
slate swan
maiden fable
#

First send then ban @slate swan

dry quiver
#

@slate swan pls chek yr pv

slate swan
slate swan
# shrewd apex than how did u know <:pithink:652247559909277706>

https://github.com/Rapptz/discord.py/blob/master/discord/http.py

client.http.do_thing

client.http.add_reaction(channel_id, message_id, emoji)
client.http.remove_reaction(channel_id, message_id, emoji, member_id)
client.http.remove_own_reaction(channel_id, message_id, emoji)
client.http.get_reaction_users(channel_id, message_id, emoji, limit, after=None):
client.http.clear_reactions(channel_id, message_id)
client.http.pin_message(channel_id, message_id)
client.http.unpin_message(channel_id, message_id)
client.http.edit_message(channel_id, message_id, **fields) #fields can include content, etc. Embeds must be to_dict'd
client.http.delete_message(channel_id, message_id, *, reason=None)
shrewd apex
#

thx a lot

maiden fable
#

And yea, Danny hates it when someone uses the Raw API methods

dry quiver
slate swan
slate swan
slate swan
slate swan
maiden fable
maiden fable
#

BTW Ash, join the API's official server, there's a wrappers channel, which has a few Python wrapper for the API

slate swan
slate swan
# shrewd apex thx a lot

and to send a message

from discord import http

#considering this is a command uwu
params = http.handle_message_parameters(content="uwu")
await bot.http.send_message(channel_id, params=params)
slate swan
shrewd apex
maiden fable
#

Yes

maiden fable
slate swan
maiden fable
#

Why tf everyone here has an Anime pfp except me

slate swan
slate swan
#

cause you are using javathon

maiden fable
shrewd apex
maiden fable
dry quiver
slate swan
slate swan
#

imagine having a discord server for discord api

shrewd apex
maiden fable
dry quiver
shrewd apex
#

👀

slate swan
maiden fable
#

Lmao

jaunty venture
#
Ignoring exception in on_connect
Traceback (most recent call last):
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\bot.py", line 1042, in on_connect
    await self.sync_commands()
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\bot.py", line 644, in sync_commands
    registered_guild_commands[guild_id] = await self.register_commands(
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\bot.py", line 473, in register_commands
    prefetched_commands = await self.http.get_guild_commands(self.user.id, guild_id)
  File "C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 353, in request
    raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
``` what does this error mean
maiden fable
#

U don't have application_commands scope

slate swan
maiden fable
shrewd apex
#

confirm

dry quiver
maiden fable
jaunty venture
maiden fable
#

If u fail the captcha, then get some sleep and then come back

slate swan
shrewd apex
slate swan
#

why.

slate swan
#

why think-

dry quiver
#

pls

slate swan
#

cause they don't use short property names like . guilds and .members lmao

#

yeah lol

slate swan
#
( member for guild in bot.cache.get_guilds_view().values() for member in guild.get_members())
#

is what i can imagine

maiden fable
#

What. The. Fuck. Is. That.

#

That's a bit...

slate swan
#

thats an actual cache

dry quiver
slate swan
maiden fable
#

Ik ik, but now is member a dict?

#

a dict of all the attrs?

robust fulcrum
#
nop =  await self.bot.wait_for('message', check=check,timeout=5)

How can we convert the 'message' into integer?

slate swan
robust fulcrum
maiden fable
robust fulcrum
#

Ok

slate swan
maiden fable
#

Or that

slate swan
# maiden fable Uhhh?

definately not what something dpy uses
CacheMappingViews are Mapping / dict with snowflakes as keys and the related object as values
in hikari ofc

dry quiver
#
for role in guild.roles:
    if role.name == "nme":
     rid = role.id
      break

@shrewd apex
correct?

shrewd apex
robust fulcrum
#

Holy command worked but have a weird output

shrewd apex
slate swan
dry quiver
#
for role in guild.roles:
    if role.name == "nme":
     rid = role.id
      break

@shrewd apex
correct?

shrewd apex
#

yeah

robust fulcrum
slate swan
#
if rid := [role.id for role in guild.roles if role.name == "nme"]:
  rid = rid[0]

ease

slate swan
robust fulcrum
#

Ye

slate swan
#

and faster than a for loop

shrewd apex
#

:=

robust fulcrum
#

One liners are good for space but hard to read

slate swan
slate swan
shrewd apex
#

oh nvm i counted

#

my bad

shrewd apex
robust fulcrum
#

Guys i did ctx.send(cars) cause i want to send list but my bot send a weird thing
Can anyone help me?

shrewd apex
slate swan
slate swan
#

bye.

paper sluice
robust fulcrum
robust fulcrum
paper sluice
slate swan
robust fulcrum
#

Ok sleep 😴

slate swan
robust fulcrum
#

Hmmm

maiden fable
slate swan
maiden fable
#

My bad

robust fulcrum
#

:()

shrewd apex
maiden fable
shrewd apex
#

both have pros and cons

maiden fable
robust fulcrum
slate swan
robust fulcrum
#

So?

slate swan
#

...?

maiden fable
robust fulcrum
#

I want to send list?

slate swan
#

your wish?

robust fulcrum
#

So how to send list?

slate swan
robust fulcrum
#

My bot not sending list iys sending a weird

paper sluice
robust fulcrum
slate swan
robust fulcrum
#

But

shrewd apex
#

ok i gtg cya

robust fulcrum
#

	@commands.command()
	async def pie(self ,ctx):
		def check(msg):
			return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nop =  await self.bot.wait_for('message', check=check,timeout=5)
		nov = int(nop.content)
		while initial<=nov:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=5)
			cars.append(apens)
			initial = int(initial+1)
		await ctx.send(cars)

Here is my command

slate swan
maiden fable
#

@robust fulcrum do await ctx.send("\n".join(x.content for x in [list_of_mesages]))

slate swan
#

^

maiden fable
#

I don't really code bots so I don't really care what lib is better lmao

slate swan
#

even the Guild object matches up to a certain point, but not really much

slate swan
maiden fable
#

Ngl I like Hikari's impl to use IDs directly

robust fulcrum
slate swan
#

uhhh

maiden fable
robust fulcrum
#

Oh Pokemon Ash?

slate swan
#

you would like their cache settings more, you can choose what and how much data to cache

maiden fable
#

O

robust fulcrum
#

Ye

#

Me try your now i tried her first

#

Ohhhh

#

Do you play myuu bot?

slate swan
#

jesus

paper sluice
maiden fable
#

Stop this before I do the ot command

robust fulcrum
#

;-;

#

What ot?

slate swan
#

off topic

jaunty venture
paper sluice
#

hikari docs are kinda nice

robust fulcrum
#

Oh k

#

Ok

jaunty venture
#

ohh

paper sluice
#

ty

slate swan
slate swan
placid verge
#

!ot

slate swan
slate swan
jaunty venture
slate swan
#

since its hosted on GitHub pages, its normal for it to not work sometimes

maiden fable
#

Ngl bot making is fun only when u r new to it. Once u learn the lib, u start to realize that bot making is boring

paper sluice
jaunty venture
#

!ot

unkempt canyonBOT
paper sluice
#

i said bot commands

paper sluice
#

u had one job

maiden fable
slate swan
#

I hate github co-pilot with all my hate now

maiden fable
#

Never used it

maiden fable
#

I prefer coding myself, rather than some AI coding for me

maiden fable
slate swan
slate swan
#

How can I do like
if hi is between some letters like:
123412hi1492
The bot would still respond
Rather than if message.content.startswith

maiden fable
slate swan
#

and you can use words

#

am not a computer

slate swan
maiden fable
#

I prefer using coding symbols rather than words with people who understand those

maiden fable
slate swan
#

Ikik

maiden fable
#

¯_(ツ)_/¯

#

And u do know mod logs exists, right

slate swan
#

you dont see 'em so idc

slate swan
jaunty venture
#

(ฅ`・ω・´)っ=

slate swan
maiden fable
slate swan
maiden fable
slate swan
#

me too

robust fulcrum
#

Oof so many errors

slate swan
robust fulcrum
#

Hunter x hunter

maiden fable
paper sluice
maiden fable
#

Not [cars]

maiden fable
slate swan
maiden fable
#

I prefer my current VSC theme

paper sluice
#

_-_

slate swan
#

boomer

maiden fable
#

That does look like a good theme tho

maiden fable
jaunty venture
slate swan
maiden fable
jaunty venture
maiden fable
slate swan
maiden fable
#

Smh vscode.dev not working on mobile

maiden fable
slate swan
#

its ew

maiden fable
#

But tbh, these designer themes start to become boring after a few days

slate swan
#

indeed

maiden fable
#

@jaunty venture gonna tell you once I get on my laptop

slate swan
#

dark dimmed? I only see monokai dimmed tbh

maiden fable
#

Never tried it. Tbh I hardly change themes

slate swan
#

weird theme I love the default one

paper sluice
#

I hate all vsc themes

slate swan
#

IDLE exists

maiden fable
maiden fable
slate swan
maiden fable
#

Stating the facts

robust fulcrum
#

My comamnd is ready!

maiden fable
#

(:

robust fulcrum
#

Now i can make a pie chart command!

maiden fable
#

Cool!

#

Using matplotlib?

robust fulcrum
#

I thought it would be hard task

robust fulcrum
maiden fable
#

Be sure to use run_in_executor!

robust fulcrum
#

Where?

maiden fable
#

To create the pie chart

#

matplotlib is blocking

robust fulcrum
#

I already have code for it

#

(◕ᴗ◕✿)

#

(:)

maiden fable
#

Ash just realized she said the opposite

maiden fable
robust fulcrum
#

Lol

#

Ash pikachu

slate swan
maiden fable
slate swan
#

Idk

brave flint
#

or what?

jaunty venture
maiden fable
warped mirage
#

slate swan
#

....

stone beacon
#

ayu all the way fam

#

fira code too

#

I made my own ayu then lost it cuz I didn't backup

maiden fable
#

Nice theme

robust fulcrum
#

	@commands.command()
	async def pie(self ,ctx):
		def check(msg):
			return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nop =  await self.bot.wait_for('message', check=check,timeout=5)
		nov = int(nop.content)
		while initial<=nov:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=5)
			cars.append(apens)
			initial = int(initial+1)
		initials = 1
		data = []
		await ctx.send("enter number of data")
		nops =  await self.bot.wait_for('message', check=check,timeout=5)
		novs = int(nops.content)
		while initials<=novs:
			await ctx.send("enter the values of labels according to order!")
			apenss = await self.bot.wait_for('message', check=check,timeout=5)
			data.append(apenss)
			initials = int(initials+1)

		await ctx.send("\n".join(x.content for x in cars))
		await ctx.send("\n".join(x.content for x in data))

Guys this is my code and i am getting error can anyone help me?

maiden fable
#

It took u more than 5 seconds to respond

robust fulcrum
#

No

#

I did it in 2 seconds

#

Still

maiden fable
#

Well

robust fulcrum
maiden fable
#

The error says otherwise. Prolly the message didn't pass the check function?

robust fulcrum
#

Hmm maybe my internet connection slow

#

@maiden fable is there any error handler for it?

maiden fable
#

try except

robust fulcrum
#

Ok

#

Where should I put it?

placid skiff
#

before the wait for

slate swan
placid skiff
#

it works like this:

maiden fable
#
try:
    nop = await self.bot.wait_for
except asyncio.TimeoutError:
    return await ctx.send("Whoops, u took ages to answer") 
robust fulcrum
#

K

placid skiff
#

!e

my_num = 2
my_string = "a"
try:
  var = my_num+my_string
except TypeError as e:
  print(e)
slate swan
#

always get ignored

unkempt canyonBOT
#

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

unsupported operand type(s) for +: 'int' and 'str'
robust fulcrum
#

Hmm i should work on pie chart now

maiden fable
slate swan
#

nobody ignores you, Hunter, everybody loves you ❤️

robust fulcrum
#

Guys how can I assign ```py
await ctx.send("\n".join(p.content for p in data))

slate swan
#

you just assign like you do for a normal variable

robust fulcrum
#

Hmm do i have to put paranthesis

slate swan
#

nope

robust fulcrum
#

K

shrewd apex
#

u have to use [] for list

honest laurel
robust fulcrum
honest laurel
robust fulcrum
#

Idk

#

Just asking is there any

#

Maybe I'll make it more fast

honest laurel
#

IS IT slow?

robust fulcrum
#

Sometimes

honest laurel
#

Well, most likely due to network overhead i think

#

Not much you can speed up there

visual island
slate swan
#

How to edit a message

heady sluice
slate swan
#

I sent an embed with msg variable and then used await msg.edit(. . .

#

Says ’Message’ object has no attribute ‘edit_message’

visual island
#

You're using .edit_message(), not edit() as shown in the error

slate swan
slate swan
#

i think they can use uvloop

#

what's that

#

not sure if discord.py has something similar inbuilt

heady sluice
slate swan
#

!pip uvloop

unkempt canyonBOT
slate swan
#

Wow

#

Cool

#

not meant for windows*

heady sluice
#

kinda ruins the point

#

but seems nice

slate swan
#

most of the hosts use linux, and not windows, better for production.

heady sluice
#

bruh I said source code

slate swan
#

Bruh

#

🤦

#
 
 ​    ​if​ ​os​.​name​ ​!=​ ​"nt"​: 
 ​        ​import​ ​uvloop 
  
 ​        ​uvloop​.​install​()``` you can simply check if the os is not windows and install it
slate swan
slate swan
heady sluice
#

why isn't it for windows too

slate swan
#

Maybe there dev uses mac

heady sluice
#

so what

slate swan
heady sluice
#

goodn't one

random girder
#

hello, do you know how to start a python script/and close it from another script? tks

maiden fable
slate swan
#

totally not expecting a bot from another bot

maiden fable
#

I think they dk about relative imports

robust fulcrum
#
import discord
from discord.ext import commands
from matplotlib import pyplot as plt
import numpy as np

def check(msg):
  return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

class pie(commands.Cog):
	def __init__(self, bot):
		self.bot = bot

    
	@commands.command()
	async def pie(self ,ctx):
		def check(msg):
			return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nop =  await self.bot.wait_for('message', check=check,timeout=5)
		nov = int(nop.content)
		while initial<=nov:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=5)
			cars.append(apens)
			initial = int(initial+1)
		initials = 1
		data = []
		await ctx.send("enter number of data")
		nops =  await self.bot.wait_for('message', check=check,timeout=5)
		novs = int(nops.content)
		while initials<=novs:
			await ctx.send("enter the values of labels according to order!")
			apenss = await self.bot.wait_for('message', check=check,timeout=5)
			data.append(apenss)
			initials = int(initials+1)
		fig = plt.figure(figsize =(10, 7))
		
		plt.pie(data, labels = cars)
		
		plt.savefig("chart.png")
		
		await ctx.send(file=discord.File("chart.png"))

	
async def setup(bot):
    await bot.add_cog(pie(bot))

Guys how to fix this error

maiden fable
#

float(message.content)

robust fulcrum
#

?

#

Where I have to put?

heady sluice
maiden fable
#

Wait

robust fulcrum
#

Ok

maiden fable
#

Mind scrolling the traceback up?

robust fulcrum
#

Ok

robust fulcrum
gaunt ice
heady sluice
#

ripit

#

ribbit Frayge

slate swan
robust fulcrum
maiden fable
robust fulcrum
#

Lol

maiden fable
slate swan
maiden fable
#

Lmao

robust fulcrum
#

Oof

slate swan
#

you have to do

#

.content while converting to float

#

you cant pass in the whole Message object

robust fulcrum
#

Done that was a timeout error

slate swan
#

?
code

robust fulcrum
#

And can you help me with a variable

#

How can I put the list in a varibable which I get from input?

gaunt ice
robust fulcrum
#
await ctx.send("\n".join(p.content for p in data)) 

How can I assign it a variable

robust fulcrum
gaunt ice
#

they use shared ips

robust fulcrum
#

Ik but me on Android

gaunt ice
#

which can cause bots to get ratelimited for no reason

gaunt ice
robust fulcrum
#

I have no other option

slate swan
robust fulcrum
#

Ok

robust fulcrum
#

Ye

robust fulcrum
#

One " missing

#

I just learning python :(

#

From codewithharry on YouTube

paper sluice
#

making discord bots is not a beginner friendly project

heady sluice
robust fulcrum
#

I still made a good one

heady sluice
#

can I doubt

#

?

robust fulcrum
robust fulcrum
slate swan
robust fulcrum
#

Ok

paper sluice
robust fulcrum
#

Il it's hard but i can do it

#

I actually want to learn Java but very hard!

heady sluice
#

my first bot I also thought was good

#

one year later I wanted to rewrite it but didn't even bother cuz it sucked

slate swan
#

just use js instead.

heady sluice
#

but I don't have the will to learn it

#

😭

robust fulcrum
#

@slate swan ```py

	cars = (p.content for p in cars)
	data = (c.content for c in data)
#

It's says a generator error

paper sluice
#

what are you trying to do with cars and data?

#

show the traceback

slate swan
#

Here is my initializing:

class BasicCommands(commands.Cog):

    def __int__(self, client):
        self.client: commands.InteractionBot = client

And I am having an error BasicCommands have no object client in this area:

embed = disnake.Embed(title='SLOGAN', description='Give a slogan for your company.', color=disnake.Color.gold())
            embed.set_footer(text='You have 60 seconds to answer.')
            emsg: disnake.Message = await inter.send(embed=embed)
            try:
                slogan: disnake.Message = await self.client.wait_for(event='on_message', check=lambda msg: msg.author == inter.author and msg.channel == inter.channel, timeout=60.0)
            except asyncio.TimeoutError:
                embed.set_footer(text='Question Expired.')
                await emsg.edit(embed=embed)
                return

Pls help I have no idea I never got this error before.

#

I am having the error in wait for section.

vocal plover
#

an iterable comprehension in parenthese like that creates a generator object, whereas one wrapped in square brackes produces a list of values @robust fulcrum

slate swan
#

Possible to respond to a button interaction inside a command?

vocal plover
slate swan
#

Its saying basiccommands object have no attribute client

#

Pls help me ;-;

#

@vocal plover

#

I don't normally ping random people but I am in hurry and I want to fix this

#

Can you pls help

vocal plover
slate swan
#

Oh wait

quaint epoch
slate swan
#

Oh nvm

quaint epoch
#

__int__ converts the object to an int

slate swan
#

@vocal plover thank you so much

quaint epoch
#

when int(object) is called

slate swan
#

But how can I do such a stupid typo

vocal plover
#

thats a cruel error tbf, since the function just never gets called and you get an unrelated error

slate swan
#

I am like the worst programmer error.

maiden fable
vocal plover
#

we've all been there lol, that one dumb error where you just are dumbfounded by how you did it

slate swan
#

And even python dont tell me that I did a typo.

maiden fable
#

I never had any difficulty picking up JS after doing Python

vocal plover
#

as i say, horrible error to debug

quaint epoch
#

typos are the worst errors

vocal plover
#

I had to read that 3 times to see the difference lmao

quaint epoch
#

because of how hard it is to find them

#

imo

slate swan
#

Aa... so okay it worked but it still doesn't do what I want

#

Its not saving data to companies.json

#

but ima check for more typos first

robust fulcrum
#

How to fix this?

vocal plover
#

I recently had an error where I was comparing datetime objects and something was executing multiple times when it wasn't meant to, it turns out my CPU frequency was too high for the precision of a datetime object, so the comparison returned true multiple times, that was absolutely miserable to debug

vocal plover
#

If I wasn't aware of that type of error I don't think I'd ever have solved it tbh

#

It's so obscure

robust fulcrum
quaint epoch
robust fulcrum
#

Hmm

#

What c

quaint epoch
robust fulcrum
#

Cars?

quaint epoch
robust fulcrum
#

No

#

Its name of list

#
import discord
from discord.ext import commands
from matplotlib import pyplot as plt
import numpy as np

def check(msg):
  return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id

class pie(commands.Cog):
	def __init__(self, bot):
		self.bot = bot

    
	@commands.command()
	async def pie(self ,ctx):
		def check(msg):
			return msg.author.id == ctx.author.id and msg.channel.id == ctx.channel.id
		initial = 1
		cars = []
		await ctx.send("enter number of labels")
		nop =  await self.bot.wait_for('message', check=check,timeout=20)
		nov = int(nop.content)
		while initial<=nov:
			await ctx.send("enter the value of pie chart to append")
			apens = await self.bot.wait_for('message', check=check,timeout=20)
			cars.append(apens)
			initial = int(initial+1)
		initials = 1
		data = []
		await ctx.send("enter number of data")
		nops =  await self.bot.wait_for('message', check=check,timeout=20)
		novs = int(nops.content)
		while initials<=novs:
			await ctx.send("enter the values of labels according to order!")
			apenss = await self.bot.wait_for('message', check=check,timeout=20)
			apenss = int(apenss.content)
			data.append(apenss)
			initials = int(initials+1)

		cars = [p.content for p in cars]
		data = [c.content for c in data]
		fig = plt.figure(figsize =(10, 7))
		
		plt.pie(data, labels = cars)
		
		plt.savefig("chart.png")
		
		await ctx.send(file=discord.File("chart.png"))

	
async def setup(bot):
    await bot.add_cog(pie(bot))
quaint epoch
#

do print(data) before the list comp

#
        apenss = int(apenss.content)
        data.append(apenss)
slate swan
#

My command still doesn't work, I am sorry if I did some stupid typos again.

    @ commands.slash_command(name='startup', description='Creates a company, you can only have one company at a time.', dm_permission=False)
    async def startup_cmd(self, inter: disnake.AppCommandInter, company_name: str):
        with open('Database\\companies.json', 'r') as f:
            companies: dict = json.load(f)
        if company_name.upper() in companies:
            await inter.send('Sorry for this, but another company already exists with that name. So please choose a different name for your company.', ephemeral=True)
            return 
        elif any(inter.author.name == nms['OWNER'] for nms in companies.values()):
            await inter.send('You already have a company. If you want to close your company.', ephemeral=True)
            return 
        else:
            embed = disnake.Embed(title='SLOGAN', description='Give a slogan for your company.', color=disnake.Color.gold())
            embed.set_footer(text='You have 60 seconds to answer.')
            emsg: disnake.Message = await inter.send(embed=embed)
            try:
                slogan: disnake.Message = await self.client.wait_for('on_message', check=lambda msg: msg.author == inter.author and msg.channel == inter.channel, timeout=60.0)
            except asyncio.TimeoutError:
                embed.set_footer(text='Question Expired.')
                await emsg.edit(embed=embed)
                return
            companies[company_name.upper()] = {'SLOGAN': slogan, 'OWNER': inter.author.name}
            with open('Database\\companies.json', 'w') as f:
                json.dump(companies, f, indent=4)
quaint epoch
#

you are adding integers to data

#

@robust fulcrum try to remove the data = [c.content for c in data] list comp

quaint epoch
slate swan
#

It just doesn't work.

quaint epoch
#

wait im getting a call

quaint epoch
slate swan
#

It should store all the info in companies.json

#

In Database directory

quaint epoch
#

show the line where is does that

slate swan
#

But it doesn't

#
companies[company_name.upper()] = {'SLOGAN': slogan, 'OWNER': inter.author.name}
            with open('Database\\companies.json', 'w') as f:
                json.dump(companies, f, indent=4)
quaint epoch
#

!d json.dump

unkempt canyonBOT
#

json.dump(obj, fp, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)```
Serialize *obj* as a JSON formatted stream to *fp* (a `.write()`-supporting [file-like object](https://docs.python.org/3/glossary.html#term-file-like-object)) using this [conversion table](https://docs.python.org/3/library/json.html#py-to-json-table).

If *skipkeys* is true (default: `False`), then dict keys that are not of a basic type ([`str`](https://docs.python.org/3/library/stdtypes.html#str "str"), [`int`](https://docs.python.org/3/library/functions.html#int "int"), [`float`](https://docs.python.org/3/library/functions.html#float "float"), [`bool`](https://docs.python.org/3/library/functions.html#bool "bool"), `None`) will be skipped instead of raising a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError").

The [`json`](https://docs.python.org/3/library/json.html#module-json "json: Encode and decode the JSON format.") module always produces [`str`](https://docs.python.org/3/library/stdtypes.html#str "str") objects, not [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes "bytes") objects. Therefore, `fp.write()` must support [`str`](https://docs.python.org/3/library/stdtypes.html#str "str") input.

If *ensure\_ascii* is true (the default), the output is guaranteed to have all incoming non-ASCII characters escaped. If *ensure\_ascii* is false, these characters will be output as-is.
slate swan
#

then how is it even supposed to work

#

Gtg ;-;

quaint epoch
#

ash gonna take it from here i gotta be in this call

loud junco
slate swan
loud junco
#
async def main():
  async with bot:
    #await bot.load_extension('commando.')
    await bot.load_extension('commando.area') #done
    await bot.load_extension('commando.boss')
    await bot.load_extension('commando.cooldown') #done
    await bot.load_extension('commando.craft') #done
    await bot.load_extension('commando.daily')
    await bot.load_extension('commando.eat') #done
    await bot.load_extension('commando.help') #done
    await bot.load_extension('commando.hunt') #done
    await bot.load_extension('commando.mine') #done
    await bot.load_extension('commando.open')
    await bot.load_extension('commando.profile') #done
    await bot.load_extension('commando.ready') #done
    await bot.load_extension('commando.reload') #done
    await bot.load_extension('commando.short') #done
    await bot.load_extension('commando.start')  
     
    await bot.start(os.getenv('TOKEN'))
  asyncio.run(main())
robust fulcrum
#

@slate swan how can I put a list in variable like you told first but that not worked

loud junco
loud junco
slate swan
loud junco
#

💀

#

sleeping on 430pm

robust fulcrum
#

Hmm my mind is going to balst today because if pie chart comamnd
Hard to make

slate swan
loud junco
#

go get some sleep =.=

slate swan
#

How can I get the id of the message sent by the bot when the command is used?

quaint epoch
robust fulcrum
#

Can anyone help me pls!

maiden fable
#

Ah, instead of cars, do [x.content for x in cars]

placid skiff
slate swan
#

If the user uses ,rm 1hr
And await asyncio.sleep(.) takes seconds
How can I make it so that if user uses 1hr it sleeps for 1hr and do stuff
Same for day and seconds?

placid skiff
#

uhm you know time is constant...

#

1 minute is 60 seconds, 1 hour is 60 minutes, 1 day is 24 hours, 1 week is 7 days, and so goes on...

slate swan
#

In simple words
This commands function is to dm the user after the time the user told

sick birch
#

You'll have to do a little bit of parsing

#

To convert different times to seconds

#

hint: check the last letter for the unit (m for minutes, h for hours, d for days)

maiden fable
#

Yo @sick birch u ever used the RPC API?

vocal plover
#

discord RPC is in (indefinite) closed beta access

maiden fable
#

Well I was tryna figure out if the large_image key supports GIFs

#

For some reason it shows blank space like this one:

placid skiff
#

!e

def timeConverter(time: str) ->int:
  MULTIPLIER = {'m': 60, 'h': 60*60, 'd': 24*60*60}
  unit, time_unit = time[:-1], time[-1]
  return unit*MULTIPLIER[time_unit]

print(timeConverter("3m"))
placid skiff
#

duh

vocal plover
#

lmao

maiden fable
# vocal plover it doesnt

Thought so, but a person in the pypresence server is like: You can use a bd plugin to show animated RPC

#

And the bd plugin also seems to use the same named pipes as pypresence

#

istg if anyone here says that bd is against ToS cz ik it is

placid skiff
maiden fable
#

for the unit, don't u think u should do time[-1]

slate swan
placid skiff
#

it should be 3 in that code

#

oh wait

maiden fable
#

!e

time = "60m"
print(time[:-1])
print(time[-1])
unkempt canyonBOT
#

@maiden fable :white_check_mark: Your eval job has completed with return code 0.

001 | 60
002 | m
maiden fable
#

See lol

placid skiff
#

!e

def timeConverter(time: str) ->int:
  MULTIPLIER = {'m': 60, 'h': 60*60, 'd': 24*60*60}
  unit, time_unit = time[:-1], time[-1]
  return int(unit)*MULTIPLIER[time_unit]

print(timeConverter("3m"))
unkempt canyonBOT
#

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

180
maiden fable
#

HAHAHA

placid skiff
#

I'M STUPID

maiden fable
#

That was an easy fix...

placid skiff
#

yeah too much days spent on javascript...

maiden fable
#

Understandable

#

Okay I just got a stroke reading some JS lines

placid skiff
#

Lmao
I've to do it cuz my tutor is making a project for a website and he ask me to help sometimes
(I had to modify a part of a library too i was like "please someone kill me")

maiden fable
#

Haha the code I am reading is worse but won't share it here since its an innocent bd plugin

slate swan
#

!ot

unkempt canyonBOT
placid skiff
maiden fable
#

I am waiting for the time when the channel name changes to #discord-api to also include help regarding the Discord RPC API and stuff

slate swan
maiden fable
#

Lmao after that he just ghosts me

slate swan
maiden fable
#

bad*

#

And eh, if that is how u see then everyday is bad but we don't talk bout it

placid skiff
#

You will not know what a bad day is until you play ranked on LoL D_D

slate swan
maiden fable
maiden fable
shrewd apex
velvet compass
#

@unkempt canyon handles our stuff pretty well. What do you mean exactly by

i want the most secure server protection?

maiden fable
#

It all depends on your internet connection tbh. JS and Python hardly have any performance differences, if not the same speed, in discord bots

shrewd apex
velvet compass
#

>

maiden fable
#

>

shrewd apex
#

oh the >

#

yeah got it

digital mason
#

Can I make a bot that logins with my main account and joins a server with invite code

velvet compass
shrewd apex
digital mason
wicked atlas
velvet compass
#

.wa short annihilated

lament depotBOT
velvet compass
#

That is what I mean

slate swan
#

how do i get user input in a discord bot

digital mason
maiden fable
#

BTW @vocal plover GIFs work in custom presence:

#

(It was a random tenor gif)

shrewd apex
pallid meadow
#

I would recommend looking into the discord.ext.Commands extension if that’s the case as that gives you a lot of utilities to work with.

slate swan
#

Congratulations'

slate swan
maiden fable
slate swan
#

mhm nice

maiden fable
#

Haha yea

slate swan
#

Thats dope

tidal hawk
#

Rookie question here: Does non asyncio database jam the discord bot? (when making queries)

slate swan
#

it does on each query

maiden fable
#

yea but its soo minute that no one cares

slate swan
maiden fable
#

Yea that

slate swan
#

it shouldnt be used tho as it can still block your bot making it miss a hb making the connection zombified

maiden fable
#

agreed

slate swan
#

and it can make your bot respond slower in some cases

jovial plover
#

Is there any other way to customise a public bot's picture and image

slate swan
#

you can do it from the developer portal

#

or, your code

#

!d discord.ClientUser.edit

unkempt canyonBOT
#

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.10)") 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.10)") 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...
ashen torrent
#

idk what to do at this point ._.

heady sluice
ashen torrent
heady sluice
#

it's also breaking the terms of service of spotify

royal meteor
#

How to implement slash commands

regal cove
#

U didn’t show your code. But by reading the error i can see that u forgot to out ”await” before ”HTTPClient.get”

slate swan
#

Hey anyone know how to ping a ip address bc im trying to make it a cmd for my bot (:

#

Idk a cool cmd ig (:

#

Not tryna have some skid bot lmao

#

damn that sucks

#

guess it can be come harmful ?

#

Yeah.

full lily
#

pinging ip addresses is not malicious

#

ip addresses are pinged all the time

slate swan
#

Yeah but you can ping a ip to the point theres 5 ms

sick birch
#

?

slate swan
#

I just thought it would be a cool cmd but thanks for the help.

sick birch
#

Pinging an IP repeatedly doesn't change the latency

full lily
#

Are you checking for latency or uptime or something like that? What are you trying to do exactly

sick birch
#

Yes please, more info would be helpful

full lily
#

not uptime. What's it called

slate swan
#

Just to check the latency

full lily
#

if the server is down or not