#development

1 messages · Page 768 of 1

earnest phoenix
#

yeah

pure gust
#

yeh i cba with that XD

earnest phoenix
#

but code blocks are for code highlighting, i doubt you'll get anything good out of that

pure gust
#

what about if i tried like

twin pendant
#

you can use css for green

#
hi
pure gust
#

Test

#

like using the bold chat format?

#

would that work

twin pendant
#

yea

#

all formatting options work in embeds im pretty sure

pure gust
#

okay that should be fine then

#

see how you done the css

#

any way to change the colour of that?

#

infact

#

nvm

earnest phoenix
#

all markdown rules except image refs, headers and tables apply

twin pendant
#

yup

pure gust
#

when trying to intall the fivem api

#

i get an error

#

  Package         mem                                                           

  Patched in      >=4.0.0                                                       

  Dependency of   fivem-api                                                     

  Path            fivem-api > npm > libnpx > yargs > os-locale > mem            

  More info       https://npmjs.com/advisories/1084  ```
twin pendant
#

thats never happened to me, guess you could try get a different version or just try ping the server and if you dont get a response then you know its offline

late hill
#

that's npm reporting a vulnerability in the package

pure gust
#

yeh is that bad @late hill

late hill
#

The full log should contain suggestions on what you can do

pure gust
#

yeh its okay ill figure another way

#

any way to space my fields between each other i.e have a line inbetween in them?

#

\n doesnt work

earnest phoenix
#

it should

#

you can only use it in field values

#

not field names

#

if you mean a horizontal space, there isn't a consistent way to do it but you can try a blank field

#

since every client renders it differently

pure gust
#

nah it literally says embeds fields cannot be empty xD

earnest phoenix
#

you can fake blank fields by adding a zero width space as the field name and value

twin pendant
#

what about .addBlankField()

earnest phoenix
#

that does exactly that

#

d.js ends up doing a lot of things for the end user because frankly a lot of the userbase is, well, stupid

twin pendant
#

lmao yeah

pure gust
#

i mean blankfield worked xD

quartz kindle
#

Unicode Character 'ZERO WIDTH SPACE' (U+200B)

pure gust
#

@quartz kindle , do you know how to do a server status request?

quartz kindle
#

what do you mean?

blissful scaffold
#

you mean to check if the discord servers are online?
they are online if you can connect, else they are offline

opaque eagle
#

Maybe just Guild#available in discord.js

pure gust
#

It is to check the status of a game server

#

( FiveM )

opaque eagle
pure gust
#

fivem

blissful scaffold
#

You should probably ask how to get the status of a fivem server on the fivem discord

earnest phoenix
#

nvm

solemn fern
#

anyone here for a python 3 question not currently related to my bot I will be making?

copper cradle
#

@solemn fern

solemn fern
#

So I am getting a syntax error on a conditional statement in the divide section of my code which is currently being used for a calculator in Python 3.

while True:
    print("Options:")
    print("Enter 'add' to add two numbers")
    print("Enter 'subtract' to subtract two numbers")
    print("Enter 'multiply' to multiply two numbers")
    print("Enter 'divide' to divide two numbers")
    print("Enter 'quit' to end the program: ")
    user_input = input(": ")

    if user_input == "quit":
      break
    elif user_input == "add":
        print('add')
        num1 = float(input("Enter a number: "))
        num2 = float(input("Enter another number: "))
        result = str(num1 + num2)
        print("The answer is " + result)
    elif user_input == "subtract":
        print('subtract')
        num1 = float(input("Enter a number: "))
        num2 = float(input("Enter another number: "))
        result = str(num1 - num2)
        print("The answer is " + result)
    elif user_input == "multiply":
        print('multiply')
        num1 = float(input("Enter a number: "))
        num2 = float(input("Enter another number: "))
        result = str(num1 * num2)
        print("The answer is " + result)
    elif user_input == "divide":
        print('divide')
        num1 = float(input("Enter a number: "))
        num2 = float(input("Enter another number: "))
        while num2 == 0:
            {
                print("Number to be divided by 0. This is invalid.")
                num2 = float(input("Enter another number: "))
            }
        result = str(num1 / num2)
        print("The answer is " + result)
    else:
        print("Unknown input")
#

and of course I get it to work once I take a break from it

slate wave
#

lol

solemn fern
#

I had forgot my : initially then thinking it was a {} tried that then figured out I was missing the : and then couldn't figure out why it wouldn't work until now

slate wave
#

ik imma feel stupid when someone sees the problem immediently

solemn fern
#

where is the description?

slate wave
#

What?

solemn fern
#

or title

#

the .setTitle and .setDescription

solemn fern
#

They aren't in your currentWeather

slate wave
#

I'm pulling from currentWeather

#

currentWeather isnt my embed

#
        let currentWeather = data.currently
        console.log(currentWeather)
         let embed = new Discord.RichEmbed()
           .setTitle(`Weather for ${args[0]}`)
           .setDescription(`This is the current weather for ${args[0]}!`)
           .addField('General', currentWeather.icon, false)
           .addField('Summary', currentWeather.summary, true)
           .addField('Tempature', currentWeather.tempature, false)
           .addField('How it feels', currentWeather.apparentTempature, true)
           .addField('Wind Speed', currentWeather.windSpeed, false)
           .addField('Wind Gust Speed', currentWeather.windGust, true)
           .addField('Precipication Percent', currentWeather.precipProbability)
           .addField('Precipitation Intesntity', currentWeather.precipIntensity);
solemn fern
#
           .addField('Tempature', currentWeather.tempature, false)
           .addField('How it feels', currentWeather.apparentTempature, true)
#

are these displaying correctly?

slate wave
#

nothing is displaying

#
    at item.request.gen.end (C:\Users\Aj Stoner\Desktop\Coding\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15)
    at then (C:\Users\Aj Stoner\Desktop\Coding\node_modules\snekfetch\src\index.js:215:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)```
#

Oh wait i've had this problem before I think

sudden geyser
#

well can you show us where you sent the message in your code

slate wave
#
        let currentWeather = data.currently
        console.log(currentWeather)
         let embed = new Discord.RichEmbed()
           .setTitle(`Weather for ${args[0]}`)
           .setDescription(`This is the current weather for ${args[0]}!`)
           .addField('General', currentWeather.icon, false)
           .addField('Summary', currentWeather.summary, true)
           .addField('Tempature', currentWeather.tempature, false)
           .addField('How it feels', currentWeather.apparentTempature, true)
           .addField('Wind Speed', currentWeather.windSpeed, false)
           .addField('Wind Gust Speed', currentWeather.windGust, true)
           .addField('Precipication Percent', currentWeather.precipProbability,false)
           .addField('Precipitation Intensity', currentWeather.precipIntensity, false);
        message.channel.send(embed)
         
sudden geyser
#

are you sure it's coming from that part of your code?

slate wave
#

Wait nvm

copper cradle
#

lol

slate wave
#

I always get the problem cuz I use message.channel.send(embed) rather than message.channel.send({embed})

copper cradle
#

I mean

#

why would you get an error for doing that

#

I never add {} and never get an error

slate wave
#

I don't know, it just happens :/

#

I had that problem before too

#

Most of mine don't need them but some do :/

copper cradle
sudden geyser
#

You don't need to do {embed} (maybe depends on version)

slate wave
#

tell that to my errors

sudden geyser
#

I doubt, but was it fixed by replacing it with {embed}?

slate wave
#

pfft found the problem

#

I was requiring Discord.js rather than discord.js

#

wait no that wasnt the problem that was just a problem I think

#

Welp I have a weather command now

copper cradle
#

I mean if you were importing the wrong package then the error you got wouldn't even be there mmulu

golden condor
warped verge
#

Good job you fucking broke reality

stray wasp
#

@coral trellis Not sure if this is something that interests you

green kestrel
#

yay

copper cradle
#

what

green kestrel
#

looks like they started to throttle my spidering during the night, but got it all

#

now just have to feed it all into my bot's learning system, thats going to take days

copper cradle
#

b r u h

green kestrel
#

what? 😛

modest maple
#

Oof u got throttled hard

#

XD

green kestrel
#

yeah, but patience... its a dedicated server and it'd get it all eventually 😄

#

im now up to 2.2 million facts in sporks, doubled its database over the past 2 days with just 5% of whats in that new dump

#

i may even have to rethink how i store it all

modest maple
#

Use Jsons 😂

green kestrel
#

lmao

#

great idea

#

😂

earnest phoenix
#

whats the best to get images from subreddit? im using snootstorm but its trash

#

any recommendations? js

mossy vine
#

reddit api

lusty quest
#

currently i use node-fetch and the reddit api

prisma lion
#

how to make the bot create an invite link never expire from a server that the cmd did run in

nocturne dagger
earnest phoenix
#

Bonjour, y'a t'il un modérateur Français ?

#

Merci, mon problème est réglé.

green kestrel
#

bonjour polo, vous parlez anglais ce vous plait?

#

and yes my french is awful lol

west raptor
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

unique nimbus
#

SMH

last lava
#

@prisma lion have u found it yet?

prisma lion
#

w3ll

last lava
#

?

restive furnace
#

@sage bobcat not actually.

sage bobcat
#

One message removed from a suspended account.

restive furnace
#

i dont think so its mini modding to get pppl into right channel

sage bobcat
#

One message removed from a suspended account.

restive furnace
#

so?

sage bobcat
#

One message removed from a suspended account.

restive furnace
#

i did put this name like 3 years ago so, i didnt change it (i did i mean i keep some other name whole but then put back

unique nimbus
#

You can name yourself whatever you want

#

except if it is racist, homophobic, other negative crap

uneven wyvern
#

any ways how I can get my bot status in the top.gg html description

sudden geyser
#

Use the widget.

uneven wyvern
#

how would I get it tho?

sudden geyser
#

Press on the edit button and scroll down, there should be a widget source below if I remember correctly.

prisma lion
#

how to send a msg to every server that the bot is in and have a channel with a specific name (to send the msg in)

#

at the end i want to send a msg to every server by "specific" channel name

restive furnace
#

Api abuse?

sudden geyser
#

Sounds like API abuse, but just filter every channel by its name and send

grim aspen
#

that's against tos i think

uneven wyvern
#

depends

modest maple
#

Depends if you have a time and limiter or requests

prisma lion
#

well i just gonna make it for a partner bot

modest maple
#

I use a system that sends like feeds from crunchyroll and we have a dynamic system to make sure we don't go past the rate limit

prisma lion
#

well

#

anyone got ideas

restive furnace
#

I use a system that sends like feeds from crunchyroll and we have a dynamic system to make sure we don't go past the rate limit - CF8

modest maple
#

Just have a list of guild IDs you iterate through and yh have a limiter

#

Also I meant live feeds not like feeds xD

prisma lion
#

xD

#

well even sending by ids is i mean API abuse?

modest maple
#

Well yes but actually no

prisma lion
#

wut

#

xD

modest maple
#

You need a limiter

#

There is no other way

prisma lion
#

well how much is the limit

#

3k servers?

modest maple
#

For sending messages it's around 5 message a sec across the whole of discord

prisma lion
#

less?

#

omg

#

well

#

5 msgs per second sounds good

#

xD

modest maple
#

So youre looking at 10Mins to send everything if you don't have anyone run any other commands and send any other messages

prisma lion
#

o

#

m

#

g

#

well i didnt think about that

modest maple
#

Cuz as soon as you get rate limited that cap get cut in half or more

prisma lion
#

well

#

like that

#

i need mm

#

3 msg per seco d

#

second

#

but how would i do it...

modest maple
#

Itterate through a list of Ids

#

Get ovjects

#

Send

#

Repeat

#

At I still wouldn't do 3/s

#

Like

restive furnace
#

1/s k

modest maple
#

Yh that's about the max u can safely go

twin pendant
#

i guess this is what sharding is for

prisma lion
#

@modest maple ok

#

so how to do it

#

xD

modest maple
#

I'm not gonna spoonfeed you the code xD

#

I told you

#

Iterate through a list of channel ids

#

Get channel object

#

Send the thing

#

Repeat the loop

#

That's essentially what it is

prisma lion
#

ah

#

k

#

i got it

hollow sequoia
#

How long the bots are approved on average?

modest maple
#

2 weeks atm

hollow sequoia
#

Thanks

blissful scaffold
#

@prisma lion don't forget to add a 1 second sleep in your loop if you want to send 1 message per second

prisma lion
#

well

#

ill make it random

#

i mean btw 1 & 2

#

xD

#

@modest maple there is a problem when the bot HOST (shutdown) , ill lose the data and im using firebase to do some stuff

#

but fb doesn't use arrays (not compatible) when updating data

uneven wyvern
#

@modest maple still?

modest maple
#

?

wicked pivot
#

Hello can someone help me with the heroku host? it's nothing to complicate at least I imagine that it's a pretty stupid thing that I'm going to ask?

modest maple
#

we dont support heroku here, sry

#

you'll need to contact heroku support

wicked pivot
#

ow okay

small prairie
#

Can I Nest Message collectors? d.js

vital lark
#

@small prairie wdym nest message collectors?

small prairie
#

Like one message collector for yes and no then i ask another question and start a collector

vital lark
#

uh

earnest phoenix
#

that isn't nested

#

that's stacked

small prairie
#

Or in one collector can i get two inputs?

vital lark
#

u can't get 2 inputs iirc

small prairie
#

Okie lack of my knowledge thank You

vital lark
#

it resolves when only 1 input is answered

small prairie
#

ah

#

So can i stack?

#

them

vital lark
#

ye

#

you just need to destroy the collector when your done using it

small prairie
#

Collector.stop?

#

I do that

vital lark
#

ye

small prairie
#

cool thank you

vital lark
#

no problem

lean pike
#

Guys i Need Add gif emoji in bot msg

west raptor
#

And? Is there an issue in doing so?

fierce garnet
#

Hi

modest maple
#

yes

earnest phoenix
#

me too

lyric hawk
#

so I need to create it with encoding @modest maple

modest maple
#

yes

#

you need to open and create the file with the supported encoding

lyric hawk
#

.encode()?

#

what a min

#

how do you create it with encoding

modest maple
#

re read the Stackoverflow link i sent

#

it has an example there

lyric hawk
#

link example?

#

which part of the stack overflow

#

the question or the comment?

#

oh

#

-*- coding: <name> -*-?

modest maple
#

okay nvm

#

nothing is helpful

#

xD

lyric hawk
#

in the overflow?

modest maple
#

open(fp, type, encoding)

lyric hawk
#

which type would I use?

#

ascii?

modest maple
#

in your open function do encoding='<encoding type>'

#

and its unicode so no

#

u need a unicode encoding

#

e.g

#

UTF-x

#

x is a number btw

lyric hawk
#

what's the x stand for

modest maple
#


    UTF-8: Only uses one byte (8 bits) to encode English characters. It can use a sequence of bytes to encode other characters. UTF-8 is widely used in email systems and on the internet.
    UTF-16: Uses two bytes (16 bits) to encode the most commonly used characters. If needed, the additional characters can be represented by a pair of 16-bit numbers.
    UTF-32: Uses four bytes (32 bits) to encode the characters. It became apparent that as the Unicode standard grew, a 16-bit number is too small to represent all the characters. UTF-32 is capable of representing every Unicode character as one number.

lyric hawk
#

representing every Unicode character as one number.

#

what does that mean

earnest phoenix
#

it's able to store the entire character in binary without splitting it

lyric hawk
#
Ignoring exception in command fish:
Traceback (most recent call last):
  File "C:\Users\Lemon\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\Lemon\Desktop\EconomyBot\cogs\generalcommands.py", line 121, in fish
    log(ctx, f'caught 1 fish')
  File "C:\Users\Lemon\Desktop\EconomyBot\cogs\generalcommands.py", line 568, in log
    log = open("log{}.txt".format(rannumber), "a", 'UTF-8')
TypeError: an integer is required (got type str)

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

Traceback (most recent call last):
  File "C:\Users\Lemon\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 863, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\Lemon\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 728, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\Lemon\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 88, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: an integer is required (got type str)```
#

type str

#

what

modest maple
#

in your open function do encoding='<encoding type>'

lyric hawk
#

what letters is not able to display?

modest maple
#

what

modest maple
lyric hawk
#

@modest maple it ain't formatting this

#

16:25:37 | console ['Traceback (most recent call last):\n', ' File "C:\\Users\\Lemon\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-packages\\discord\\ext\\commands\\core.py", line 79, in wrapped\n

#

\n

modest maple
#

what do you want it formatted to?

lyric hawk
#

to make it so that \n does newline

#

but it isn't doing that

#

it works when I have it in in the string

#

but if it's in the vars it says yeet

modest maple
#

well yes that makes sense

#

\n only works in strings

lyric hawk
#

but it is in string form

#
    logtxt = str(logtext)
    log.write(f"\n{ct} | {ctx.author} {person} {logtxt}")
    log.close()```
modest maple
unique nimbus
#

ct

#

what

earnest phoenix
#

guys i need your help

modest maple
#

Don't ask2ask

earnest phoenix
#

what

modest maple
#

guys i need your help

#

Just say Ur issue

earnest phoenix
#

oops

#

im i found what i was looking for

#

sorry

modest maple
#

Dw

blissful scaffold
#

We are helping telepathically

#

Just think about your problem and we will fix it

lyric hawk
#

@modest maple how does one use starred expressions

vital lark
#

wdym

lyric hawk
#

because they give me an error 99% of the time

#
    logtxt = *logtext
             ^
SyntaxError: can't use starred expression here```
#

i'm trying to unpack a list

#

and it say no

vital lark
lyric hawk
#

what does this tell me

#

bc this ain't telling me shit

vital lark
#

it tells you how to do it properly

#

Stackoverflow is a good place to look for questions of what's broken

lyric hawk
#

it works if I use print

#

but not if I do anything ellse

modest maple
#

Because that's how python works?

#
  • is essentially saying "everything in this object"
pliant needle
#

@earnest phoenix I'm bad at math, pls halp? var sec_num = parseInt(this, 10); var days = Math.floor(sec_num / 86400); var hours = Math.floor((sec_num - (days * 86400)) / 24; var minutes = Math.floor((sec_num - (hours * 3600)) / 60); var seconds = sec_num - (hours * 3600) - (minutes * 60);

#

I keep getting wildly different bullshit

#

ignore the syntax error

#

that's fixed

valid frigate
#

did someone tell you to do this on your own because there are very lightweight libraries out there that can do this for you

pliant needle
#

I wanted to do it on my own

valid frigate
#

oh ok

pliant needle
#

But my math is bad

valid frigate
#

why are you using a radix of 10

pliant needle
#

10 is the server tick?

valid frigate
#

????

#

have you tried parseInt without the 2nd parameter

#

your code looks correct for the most part

pliant needle
#
    var sec_num = parseInt(this, 10);
    var days    = Math.floor(sec_num / 86400);
    var hours   = Math.floor((sec_num - (days * 86400)) / 24);
    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
    var seconds = sec_num - (hours * 3600) - (minutes * 60);

    if (days    < 10) {days    = "0"+days;}
    if (hours   < 10) {hours   = "0"+hours;}
    if (minutes < 10) {minutes = "0"+minutes;}
    if (seconds < 10) {seconds = "0"+seconds;}
    var time    = days + " days, " + hours + " hours, " + minutes + " minutes, and " + seconds + " seconds";
    return time;
}```
#

That's the whole function

valid frigate
#

honestly im led to believe its because of that second line

#

can you try without it

pliant needle
#

the sec_num line?

valid frigate
#

yeah but dont remove the first param

pliant needle
#

I mean

#

It gets the days right

#

It's gotten time right before

#

It used to not do days

#

Everything worked fine

#

Then I went to add days once I had longer uptimes and I've had trouble ever since

valid frigate
#

also i dont understand why hours is using (days * 86400)

#

so you're still sure you don't want to use an npm package that does this for you

topaz fjord
#

god damn that's a thicc function

pliant needle
#

I wanna do this myself

topaz fjord
#

it can be way shorter

pliant needle
#

Good practice

valid frigate
#

who said it was good practice

pliant needle
#

...I did?

valid frigate
#

you know what never mind

#

also with the statement above, the thing youve been trying to do has been done before

topaz fjord
#

you could just use a bunch of mod to find what you want

valid frigate
#

and there are much shorter solutions

pliant needle
#

I wanna do it myself though

valid frigate
#

give me a moment to read over your code one sec

pliant needle
#

Tryna actually get good at coding

valid frigate
#

the code looks exactly like yours

#

why the fuck you lyin

pliant needle
#

I'm not?

topaz fjord
#

const s = (seconds) % 60;

valid frigate
#

????

#

oh you also wanted days

pliant needle
#

I took that as reference

#

Yeah

topaz fjord
#

unless mod does something different in js

valid frigate
#

no it looks like blatant copy paste except for the days variable

#

modulo doesnt change lmao

#

unary operators are supposed to do one thing

topaz fjord
#

ok

pliant needle
#

I typed it out and started fucking with it

valid frigate
#

i mean in theory your code should work

pliant needle
#

To get better at understanding how it works

#

It should

#

idk why it's not

valid frigate
pliant needle
#

the math's not incorrect, is it?

#

Because it's throwing dumb numbers

valid frigate
#

no it should be right

#

because obviously if you have a duration > 86400 seconds math.floor should round it down to 1 and so on

#

@pliant needle define "weird numbers"

pliant needle
blissful scaffold
#

@pliant needle what you want to use is modulus also known as %

#

for example to get the seconds you can do

var seconds = sec_num % 60;
west raptor
#

uh what

#
> 180 % 60
0
> ```
blissful scaffold
#

because it's 3 minutes and 0 seconds remaining

#

100 % 60 would be 40 seconds
because it's 1 minutes and 40 seconds

west raptor
#

oh i see

blissful scaffold
#

I could also give an example how to do it for minutes, but that would be a bit too close to spoonfeeding

west raptor
#

i literally never use the % operator

#

so i dont understand it at all

blissful scaffold
#

it is the remainder of 100/60 if you would only return whole numbers

#

100/60 would be 1 remainder 40

west raptor
#

oh ok

blissful scaffold
#

it is a weird operator that has a few nice uses

bright salmon
#

Bro i want to setup bot in my server..will anyone tell how

blissful scaffold
#

You can select any bot you want on https://top.gg/ and click on the invite button

last lava
#

oh was he not talking about his own bot

blissful scaffold
#

No idea, but I just noticed this is the wrong channel

empty owl
#

How does one do this

#

it’s like an embed with no bar

#

Ping me if responding

sudden geyser
#

It's just set to the same color as the background. It's not really transparent.

empty owl
#

oh

#

thanks

blissful scaffold
#

It might be visible with a light theme

empty owl
#

yea

#

but no one cares about light theme users

sudden geyser
empty owl
#

thanks

unkempt ivy
#

wait

#

So creating a fisheye distortion of the logo is illegal?

#

bruh

sage bluff
#

Hello, I just voted for the mudae bot, but didn't get a vote reset. Now I don't know how exactly that works, but the support there says they can't do much about it. It seems you guys have more control over these kinds of exceptions, could you guys check that out?

#

it's happened twice to me now, basically what should happen is a reset of a timer caused by a vote. The vote happens (can't vote again) but nothing happens with the bot.

sinful lotus
#

Prob's the way they handle it or something

#

dbl rarely have issues on webhooks

empty owl
vital lark
#

is m defined in the code

empty owl
#

yea

vital lark
#

hm, can you show the whole file

empty owl
#
bot.channels.get(object["channel"]).fetchMessages(object["message"]).then(m => {
})
#

its in a ready event

vital lark
#

m is undefined then

empty owl
#

how should i define it

vital lark
#

maybe add a .catch block and see what logs in the console

empty owl
#

ok

#

thanks

vital lark
#

no problem

lyric hawk
#

@modest maple how does one use the epic discordbots api

earnest phoenix
#

like you would use any other

lyric hawk
#

the docs are shit

#

there are not docs (that I see)

earnest phoenix
#

what

sudden geyser
lyric hawk
#

I saw that

earnest phoenix
#

every endpoint is doc'd

lyric hawk
#

but that is not helpful

earnest phoenix
#

it is

lyric hawk
#

only one mention of what I want to do

@commands.Cog.listener()
    async def on_dbl_vote(self, data):
        logger.info('Received an upvote')
        print(data)```
earnest phoenix
#

the docs are badly written but they explain all endpoints

blissful scaffold
#

what do you need to know that isn't clear?

lyric hawk
blissful scaffold
#

that code snippet is just an example of how to receive votes.
logger.info will log the message that it received an upvote

lyric hawk
#

aight

#

what is data?

blissful scaffold
lyric hawk
#

where is the test button

blissful scaffold
#

I never checked it myself, but that is what the documentation says
You can print the data if you want to be sure what it is

#

Go to the page where you can edit your bot and at the bottom there is a test button

lyric hawk
#

wow this is working

#

def

blissful scaffold
#

nice token

lyric hawk
#

time to regen

blissful scaffold
#

time to reset that

lyric hawk
#
class TopGG(commands.Cog):
    """Handles interactions with the top.gg API"""

    def __init__(self, bot):
        print('TopGG Cog')
        self.bot = bot
        self.token = dbltoken
        self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes

    @commands.Cog.listener()
    async def on_dbl_vote(self, data):
        print(data)
#

still doesn't work

#

GeneralCommands ErrorHandler OwnerCommands HelpCommand Main Loaded, with 1 shard(s) Version 2.2.0 TopGG Cog

#

Test button does nothing

blissful scaffold
#

I think there are also some problems with voting right now, so you might want to test it later

#

it could be your code, or it could be the site

lyric hawk
#

stole it right from the docs

#

what problems with voting?

copper cradle
#

is that a self, bot that I see

restive furnace
#

where you do see that it is?

#

normal bot can have exact same features.

earnest phoenix
#

im pretty sure that was a joke

small prairie
#

How can i get the content of an embed?
Like field,footer,author,title'content

#

d.js

slender thistle
#

@lyric hawk you didn't even activate the webhook

modest maple
#

XD

restive furnace
#

@small prairie by fetching the message?

#

(not the content)

small prairie
#

i can get the message which has the embed

summer torrent
#

@cursive kiln hey

modest maple
#

One

#

Reset token

#

That's a awful token leak

summer torrent
#

Regenerate your token

modest maple
#

Two

#

Token is a string

cursive kiln
#

Why

#

Ok im try reset it

summer torrent
#

Token is your private data

modest maple
#
  1. Iearn basic is before making a bot
#
  1. it's not asynic
#

It's async

#

There is alot wrong with that code for simple code

slender thistle
#

Yo take a few steps back and learn basic programming

cursive kiln
#

What is is

#

?

glad charm
#

?

cursive kiln
#

He said learn is

glad charm
#

Learn basics.

cursive kiln
#

What baiscs?

glad charm
#

Programming basics.

cursive kiln
#

????

glad charm
#

What's confusing you?

cursive kiln
#

Whats programming

glad charm
#

@coral trellis I can't tell if troll or not.

earnest phoenix
#

!help

coral trellis
#

@cursive kiln I suggest you go onto google and learn a little about the subject and research about what you wanna create

cursive kiln
#

Im not from english sorry

coral trellis
cursive kiln
#

Ok i will

#

sorry for bad english

glad charm
#

Ah alright.

earnest phoenix
#

Don’t mention me plz & thx

glad charm
#

That makes a little more sense.

cursive kiln
#

I ask you later when i learn

coral trellis
#

Anyone else?

cursive kiln
#

No just he or she

coral trellis
#

I am asking if anyone else got the dm

cursive kiln
#

I dont know

grizzled valley
#

WARNING:discord.gateway:Heartbeat blocked for more than 130 seconds.

#

why is this error coming?

modest maple
#

Your getting rate limited maybe

grizzled valley
#
                for j in search(query, tld="co.in", num=1, stop=1, pause=2):
                    await ctx.send(j)```
#

for this one i think

#

u know any alternatives to it?

slender thistle
#

I'd bet it's blocking

grizzled valley
#

in fact it is

#

thats why i am asking for a alternative

lament meteor
#

i mean doesnt google change it every now and then

slender thistle
#

Find an async version or use run_in_executor provided by asyncio

grizzled valley
#
    async with session.get(my_url) as resp:
        if resp.status != 200:
            return await channel.send('Could not download file...')
        data = io.BytesIO(await resp.read())
        await channel.send(file=discord.File(data, 'cool_image.png'))```
#

will do ig?

slender thistle
#

Looks good

lean tinsel
#

@coral trellis how can i do so it says how many servers my bot is in? (its coded in python)

coral trellis
#

On your bot page?

lean tinsel
#

yea

coral trellis
lean tinsel
#

thx

#

code ^^

modest maple
#

You actually sent a post request

#

To actually send the server count

#

Also you have a async function to print some text Thonk

lean tinsel
#

what do i have to change? (btw i copied the code from the Official API Site)

glad charm
#

It's cause that only sets you up with the DBL api

#

You need to actually post the count.

lean tinsel
#

how?

glad charm
#

Oh I didn't see the autopost

lean tinsel
#

but it still show N/A on top.gg

#

showa

glad charm
#

Did you wait 30minutes

lean tinsel
#

showa

teal pasture
#

Does anyone have issues with the ccleaner popup telling me that its out of date causing script issues with bots?

lean tinsel
#

oh thats why @glad charm sorry ;D will report back

glad charm
#

;p

slender thistle
#

@glad charm Bro nah

#

there's no need to wait 30 minutes if they restart the bot :^)

glad charm
lean tinsel
#

i did that as well

#

do i try to wait 30 minutes? @glad charm @slender thistle

glad charm
#

You could use the manual way to post to quickly see.

#

But I assume it waits 30minutes upon startup.

lean tinsel
#

k

#

will wait and than report back 😄

slender thistle
#

How are you loading that class

lean tinsel
#

?

slender thistle
#

Are you doing client.add_cog anywhere in your code

#

Because all you really are doing is making TopGG class and leaving it be

lean tinsel
#

nope not doing that oops.... where do i put that?

slender thistle
#

eh... after creating all your commands I'd say

lean tinsel
#

so right before the BOT token?

obtuse wind
#

okay, I have no right to tell you what to do, but this is a suggestion, I suggest you should make a JSON file for the bot config

lean tinsel
#

how do i get that to work? lol xd

slender thistle
#

"after"

#

not "before"

lean tinsel
#

k

slender thistle
#

@obtuse wind Good idea if handled properly

lean tinsel
#

@obtuse wind how do i setup a json file?

#

with that

obtuse wind
#

are you programming a discord bot with javascript?

slender thistle
#

welp, the "if handled properly" option goes out of the window

lean tinsel
#

nope. python

slender thistle
#

that's python

obtuse wind
#

python is kind of the same

#

just go into the bot folder

#

make a file called "botconfig" or <whatevername>.json

#

and then in there

#
{
 "token":"your token here",
 "prefix":"what ever prefix you use"
}
lean tinsel
#

and remove that from the main file?'

obtuse wind
#

and then, in your bot file just add a line some where "const cofig = require(`./<name of file>.json`)"

#

pretty much its simple

#

then you go to your token area, and put config.token

slender thistle
#

Working with JSON files in Python is different

#

let's not cause even more confusion

obtuse wind
#

oh well

#

I guess python is different

#

also

#

WHICH SON OF A BITCH

#

had a bot message me those

lean tinsel
#

error?

slender thistle
#

Just when I thought headache could go away

lean tinsel
#

oh wait

#

might know the error

#

nevermind not fixed

#

@obtuse wind

slender thistle
#

Google exists

#

just a hint

lean tinsel
#

i know but.....

slender thistle
#

Read the Reading JSON from a File part

lean tinsel
#

thx bro

slender thistle
#

Basically what you would do is before declaring any variables and after importing anything, you open your .json file and save its stuff under different variables

#

one of them being the top.gg token which you use in DBLClient

lean tinsel
#

k

#

so how would i write that token in the json file?

slender thistle
#

Read stuff on JSON syntax

lean tinsel
#

k

radiant owl
#

soryr if this message is incoherent, and this isnt necessarily discord bot development, but im writing something in python and i was just having trouble getting this function to work the way i wanted and figured one of y'all could help me??? i want my program to take two different inputs, and alternate between them to get one combined string. i made a diagram of what i want it to do, as well as what my code is right now, which gives me an output of "cHhAaDd" thanks !!!

#

the two print statements are just so i could see where it was going wrong lol

grim aspen
#

are you getting any errors?

modest maple
#

It's not an error

radiant owl
#

if this is the wrong channel to put this in im really sorry

modest maple
#

It's just what's left is replacing duplicate text

#

My first advise is switch to python 3 rather than Python 2 as it has some handy functions that will help you that python 2 doesnt

radiant owl
#

oh okay!

modest maple
#

as for mashing up the text just have a toggle var

#

And switch between one input and the other

#

To make the string

radiant owl
#

okay thank you!

sage bobcat
#

One message removed from a suspended account.

unique nimbus
#

something beautiful

#

nothing wrong with that

prime cliff
#

^

restive furnace
#

'^' why everyone do that (including me), whats the point?

blissful scaffold
sudden geyser
#

why do you care about someone's pfp

restive furnace
#

^

glacial mango
#

How do I find member Jasper#0005 with search string jas, jasper, member id or 0005?

quartz kindle
#

if the user is cached, you can loop over the cached users and match by username

#

if the user is not cached, then its not possible

amber fractal
#

Well if you have their id, use that. Otherwise all of those other things arent unique and could return the wrong thing or nothing at all if, as tim said, they aren't cached

quartz kindle
#

if you know the guild the user is in, you can try using fetchMembers()

glacial mango
#

hm

#

And then do what?

quartz kindle
#

are you using discord.js?

amber fractal
#

You could also cache all members on start but, uh that's bad

glacial mango
#

Yes I am

quartz kindle
glacial mango
#

But what do I do when I have all the members?

amber fractal
#

You can use .find if you just have their username

#

It will return the first element to pass the filter

copper cradle
#

@lean tinsel omg why are you even using JS syntax in python omg

lean tinsel
#

someone send me the code

copper cradle
#

I mean

#

you shouldn't copy and paste

lean tinsel
#

do you have the right code or ?

copper cradle
#

if you knew python syntax then you wouldn't have donde that bc you'd automatically recognize that isn't python

lean tinsel
#

yea...

copper cradle
#

to load and parse json

#

import json

#

json.load()

lean tinsel
#

than?

copper cradle
#

then what

lean tinsel
#

is that all?

copper cradle
#

not really

#

but there's no way of doing things

#

you gotta do everything your own way

restive furnace
#

msg guild members fetch (id)

#

@glacial mango

#

little bit late but anyways

#

and id get it by looping

#

xd

copper cradle
#

you can also go to https://google.com and search "how to read and parse json files in python"

warm marsh
#

Is using 'with' in any language bad practice?

#
// For example
let obj = null;
with (Object) 
{
  obj = create({ });
}```
mossy vine
#

Using with is not recommended, and is forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object whose properties you want to access to a temporary variable.

hoary elm
#

I have a question (discord.js) related I have a hackban command (allows users to be banned via ID) I have seen a few bots with this feature but my question is the command works and all but doesn't send the message to the channel after saying User was banned I have it set to send a message but it doesn't and provides no error

#

I have the normal ban command set up the same way (minus the banned via ID function) and all works including the message that says the user was banned

Sorry if I'm not explaining it the best.... just woke up and not really sure how to explain this

Example:

user.ban(7).then message.channel.send("Done")

copper cradle
#

send code

hoary elm
#

One sec

copper cradle
#

wrap that

#

.then()

hoary elm
#

Here's the actual code

#

It doesn't send the message saying they were banned or the log and I have it set to do both

copper cradle
#

aight lemme see

hoary elm
#

Sorry I know it's not the cleanest setup I am working on making it look better to 😁

sudden geyser
#

@warm marsh not every language, but in JS it is.

#

Not even Strict Mode allows it.

warm marsh
#

Alright.

#

It seems stupid to use anyways.

copper cradle
#

first

#

idk if this will fix the problem

hoary elm
#

I have tried a few things and failed so I'm open to opinions 😁

copper cradle
#

but change those find('name', 'kddkns')
to a function

hoary elm
#

For the channel?

#

Ok

copper cradle
#

yeah

warm marsh
#

You should be getting a deprecation warning in the console using find like find('name', 'namehere')

copper cradle
#

^

hoary elm
#

Honestly the only thing I get is this (node:135) DeprecationWarning: Collection#find: pass a function instead

#

But I thought it was for something else since it doesn't really specify

warm marsh
#

Yeah that's the dep warning.

hoary elm
#

Alright well atleast I know what it means now 🤦🏻‍♂️

warm marsh
#

It specifies that a collection using the pass method wants a function.

#

Did passing a function fix it?

hoary elm
#

Ah okay so I need to change it to a fucntion and should fix that warning?

#

Gimme one sec I'll do that now

warm marsh
#

Can use an arrow function eg ch => ch.name === "name"

hoary elm
#

Yeah I did that it fixed the depreciation warning but didn't help with getting the bot to send the messages afterwards

warm marsh
#

Alright.

#

Does the user you hack ban get banned?

hoary elm
#

Yes the ban works

#

Just doesnt do anything after that (IE: Logs, ect)

#

I have it set to send a message in a pre named mod logs channel

#

Aswell as a confirmation message in the channel the command was executed in but it doesn't do either

warm marsh
#

The bot has permissions to send messages into the channel?

hoary elm
#

Yes

warm marsh
#

Mhh, Odd.

hoary elm
#

Yeah I'm not sure

#

First command that has given me this issue

#

But I still learnt something new about the depreciation warning so thank you guys for the info on that 😁

#

Ohhh I got it 😁 I guess I didn't have the fucntion set up to find the channel properly 🤦🏻‍♂️ thank you for your help @warm marsh & @copper cradle

#

Sorry for the tag 😬

copper cradle
#

don't worry

#

np

hoary elm
#

On the bright side I finally got rid of that depreciation warning 😂😂

warm marsh
#

No worries!

glacial mango
#

How do I remove the first 2 words from an array item?

vital lark
#

@glacial mango slice the array

#

using the slice function

grizzled valley
#
import discord
import asyncio
@client.command()
async def translate(ctx , query):
    await ctx.send('Translation:', translate.translate( query , 'en'))```
late hill
#

from an array item
^^meaning that's not what you meant or ..?

grizzled valley
#

giving the following error Traceback (most recent call last): File "C:\Users\S Som\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 79, in wrapped ret = await coro(*args, **kwargs) File "D:\Saved Pictures\bot.py", line 433, in translate result = translate.translate( query , 'en') AttributeError: 'Command' object has no attribute 'translate'

#

why so?

vital lark
#

it's doing an interpolation

#

change the command function or the import using as

glacial mango
#

@vital lark I mean how to remove the first 2 words from the first array item? array[0]

vital lark
#

use slice

late hill
#

Provide information about the item

#

You can also use the term element for items in an array

glacial mango
#

I mean if the array is

['case #1 this is the reason', 'case #2 this is the other reason']```

It removes `case #1`
late hill
#

Well as you've shown you already know how to get the element

#

So the only thing you need to figure out is how to remove the first 2 words of a string

glacial mango
#

Yes but that's the thing I don't know

grizzled valley
#
TypeError: 'module' object is not callable```
glacial mango
#

Can't find anything on Google

grizzled valley
#

lmao gives the followiing error

modest maple
#

just saying

#

thats not how modules work in python

#

xD

#

you cant just assign A module to a var

grizzled valley
#

thats not the module tho

#

thats the api key

modest maple
#
from yandex_translate import YandexTranslate <--- Youre declaring this a module
import discord
import asyncio
@client.command()
async def translate(ctx , query):
    await ctx.send('Translation:', translate.translate( query , 'en'))```
vital lark
#

@glacial mango you use slice

#

and count the letters so

modest maple
#

you're saying import YandexTranslate

#

then just pulling translate out of thin air

grizzled valley
#

oh i got it thanks

glacial mango
#

@vital lark the case number could be anything so that won't work?

late hill
#

You could indeed hardcode it to remove a certain amount of characters

#

But that doesn't match your definition of removing "words"

vital lark
#

^

late hill
#

A solution to that could be splitting the string on spaces which gets you an array of all words

#

Meaning all that's left is to remove the first 2 entries

#

There's possibly a more efficient way do this

#

Perhaps using a regex

glacial mango
#

¯_(ツ)_/¯

blissful scaffold
#

I would use Wesley's solution of splitting the string on spaces

#

There might be more efficient ways, but this is the easiest way

glacial mango
#

I don't know how to do that

grizzled valley
#

why is that?

modest maple
#

cuz global vars are a thing

#

scope exists

#

a subrutine cant see vars outside itself unless its defined as global var

grizzled valley
#

ah i see

blissful scaffold
#

Is that your yandex token in that screenshot?

#

@grizzled valley

grizzled valley
#

yes

#

nvm its the blocked one

grizzled valley
#
@client.command()
async def translate(ctx , *, query):
    await ctx.send('Translation:', translate( query , 'en'))```
#

tried it like this

#

says command is not callable

modest maple
#

once again variable scope, secondly how are you calling the function

west spoke
#

No errrors

#

but it doesnt want to work correctly

modest maple
#

what is it supposed todo

west spoke
#

Remove all lines until there are only 5 left

#

Starting from line 1

slender thistle
#

What

modest maple
#

you know if you do split on \n it removes the \n right?

west spoke
#

yeah but I want to count the amount of \n

slender thistle
#

string.readlines()?

late hill
#

your while condition

#

would never be true

west spoke
modest maple
#

if you're splitting on \n then the amount would be len(content) - 1

#

but as shiv pointed out you could just do string.readlines and give it a limit

west spoke
#

but would that limit it to the last 5

modest maple
#

no?

west spoke
#

That's what I'm trying to di

#

do*

modest maple
#

you can set the range with readlines()

west spoke
#

so the range would be -5:? (Or :-5)

#

I dont use that method much

#

meh lemme try one more thing

modest maple
#

what would be easier is doing file.readlines()[<Total Length of list - the amount you want to take from the end>:]

west spoke
#

I got another method working, I think

#

But now it completely resets when the list returns true

#

Lemme try to fix it hh

lyric hawk
#

how do you activate the webhook

modest maple
west spoke
#

Thanks CF and shiv. I kinda merged your two answers and got it working exactly how I wanted it to

modest maple
#
>>> List = [2, 34, 5, 6, 7,3, 5]
>>> print(List[:5])
[2, 34, 5, 6, 7]
>>> print(List[5:])
[3, 5]
>>> print(List[len(List)-5:])
[5, 6, 7, 3, 5]
>>> print(List[len(List)-2:])
[3, 5]
>>> ```
#

python is goood

lyric hawk
#

splicing hurts my brain

modest maple
#

how

west spoke
lyric hawk
#

I don't see how the hell it makes sense

modest maple
#

that is quite the complicated system xD

west spoke
#
  • [num]: starts from beginning
  • [num]: starts from end
#

I believe

modest maple
#

all the - does is flip the list so yh

west spoke
#

mhm

#

so that it starts it at the "end"

modest maple
#

yh

west spoke
#

But yeah you know me

#

I try to make my code work in the most inefficient and annoying way possible

modest maple
#

why do anything simple, thats what i always say xD

west spoke
blissful scaffold
#

It's a great rule to live by and it ensures that no other dev wants to steal your code

west spoke
#

^

modest maple
#

my friend made an AI that learns by editing its own code file and restarting itself once its learnt somthing to apply the updated xD

#

its not pretty

#

but it works

#

xD

slender thistle
#

some_string.splitlines()

west spoke
#

oh lord

#

I need it send it to me

slender thistle
west spoke
#

but I mean the rest of the code for it just checks if there is duplicate messages (from the same second)

#

in as usual, the most inefficient way possible

slender thistle
#

Duplicate lines?

ruby talon
#

Hey.
Anyone know how2 use the ternary operator in C#?
Doesn't really work with what I've done :/

double greatness = (greatness_calc > 100) ? 100 : ((greatness_calc < 0) ? 0 : greatness_calc);
slender thistle
#

What is greatness_calc

lofty hamlet
ruby talon
#

@slender thistle a number.

#

Depends on input.

slender thistle
#

How exactly does it not work

ruby talon
#

If the greatness_calc is ex 100000 it returns 100000 in place of the expected 100.

slender thistle
#

Are you sure it could be because of the type you're giving to the variable

#

since that code snippet seems to be ok

ruby talon
#

Both double

slender thistle
#

Mind trying int?

ruby talon
#

aight.

#

2sec

#

Same result.

#

I'll ask it to my teacher tomorrow.

#

And another C# question.
Why use string.Format() in place of $""?

slender thistle
#

Also my last guess is to restart the bot or add an output somewhere to make sure the code is "up to date"

west spoke
#

Nothing specifically wrong

#

I just want to know if it would work or not

#

I dont do much in js but I want it to still work better than the bad one I made before

#

I don't think I got the response from the http requests.

#

hecc

slender thistle
#

you got no response here either

west spoke
#

yeah

#

I expected that

dusky marsh
#

Where are you importing fetch

west spoke
#

I dont know

#

I dont use js

#

alright

dusky marsh
west spoke
#

c r i

#

Alright yeah I'll just use http like I did before

#

I guess

dusky marsh
#

Also afaik you can't use class like that

#

Just export an object with the functions as the body

west spoke
#

ight

#

I thought it might have worked like that

#

I use python too much

#

much

#

I think it might be a little better?

quartz kindle
#

you can have a class without a constructor

#

it just defaults to constructor() {}

#

you just need to fix your http requests

west spoke
#

I said already I dont know js S3TheSaddest

quartz kindle
#

also

#

wat

west spoke
#

oh I didnt see that

#

Fixed

quartz kindle
#

if you want to go for the object of functions, its easier to do like this js module.exports = { neko: function() { } anime: function() { } } or like this js function neko() { } function anime() { } module.exports = { neko,anime }

west spoke
#

Thanks

quartz kindle
#

using module.exports instead of exports.somename allows you to import it with any name, ie bla = require(yourfile); bla.neko()

west spoke
#

Ooo

#

But

quartz kindle
#

as for your http request, node-fetch follows the same syntax as the fetch api present in browsers, and its syntax is a lttle bit weird

west spoke
#

I want to eventually have others like searching

#

I dont know the syntax for either of them

quartz kindle
#

from their docs: js fetch('https://api.github.com/users/github') .then(res => res.json()) .then(json => console.log(json));

#

fetch returns a promise containing a basic response, which in turn gives you the option to get the full response in another promise

west spoke
#

Would instead of json, would .text work?

quartz kindle
#

yes

west spoke
#

Alright! Thanks

quartz kindle
#

you can also use async/await syntax like this js let response = await fetch('https://api.github.com/users/github'); let json = await response.json();

#

or a chained promise one-liner js let json = await fetch('https://api.github.com/users/github').then(res => res.json())

worn burrow
#

chokes

west spoke
#

I made a few changes

#

Would this work?

#

It probably wont

#

but

slender thistle
#

tias

west spoke
#

wot

slender thistle
#

Try it and see

west spoke
#

I can't my version of node is outdated

#

and I dont have access to a computer

slender thistle
west spoke
#

Meh fine

slender thistle
#

Yeet

west spoke
#

I cant paste on mobile what's this fuckery

knotty steeple
#

boi

#

hold down the typing area

#

smh

west spoke
#

I did

#

do you think I'm dumb

#

know what

#

dont answer that

sage bobcat
#

One message removed from a suspended account.

modest maple
#

Sort of throwing this issue out here;

I seem to be having some sort of issue with my class that handles an SQL dB,

If I tell it to add data into the dB and then fetchall it gets all the data yet when fetching everything normally in its class function it returns nothing

quartz kindle
#

looks okay, just make sure all the variables are properly scoped, right now they are all global, which is bad

modest maple
#

And I have no idea why

#

Because connections and the cursor are both class vars

#

So in theory they shouldn't be seeing two different things

#

So I'm thinking maybe it's not committing the changes like it should or that it's something Todo with the class inheritance

#

I'm not sending code because it's long and it's late and this seems to be more of a logic issue for me and just wanna rant it iut

knotty steeple
#

@west spoke i do

west raptor
#

How could I made it to where JDA's log level is errors only? I kinda dont like the annoying debug messages that jda gives
nvm i forgot to config logback, am retarded

twin pendant
#

just re writ all my command handlers to implement per server prefixes

#

took a while but worth it

empty owl
#

is this api abuse

#

btw it’s a webhook generated by a bot with my avatar and stuff

vital lark
#

no

empty owl
#

It’s useable for everyone tho

#

mk

blissful scaffold
#

Is there now a limit to how often a bot can change its avatar?

sudden geyser
#

There's been a limit for a long time.

#

I think it's like twice an hour.

blissful scaffold
#

yeah, so moose his bot might not be able to change the avatar often

fallow quiver
#

Question: How does one change a bot's status from 'Playing' to 'Watching' Like Luca?

Second Question: Does anyone know if when discord.js will update to integrate custom statuses?

slender thistle
#

1: Read your library's documentation, it's usually described there
2: Reading custom statuses is no problem. Using the system is, however, not possible due to some API conflicts afaik

west raptor
blissful scaffold
#

Most libs support 4 different status types: Playing, Streaming, Listening and Watching

#

How you use them depends on the library you use and will be described in the documentation

sudden geyser
#

@blissful scaffold it's different on webhooks though (I think).

#

The ratelimit I meant as in changing the client user's avatar.

blissful scaffold
#

yeah, i know the limit for users is around 2 times per hour

#

i hate that limit

honest belfry
#

lmao memes

prime fox
#

how do i get my bot unmuted

glad charm
#

Probably give a mod your bot's id and explain to them.