#development

1 messages ยท Page 597 of 1

junior summit
#

i think its the internet

#

the ping is sky high

earnest phoenix
slender thistle
#

async or rewrite

earnest phoenix
#

rewrite

#

using discord.py rewrite, how can i make the bot be able to send join/leave messages on all the servers the bot is on?

#

or configurable so that if they want them they can set it up

slender thistle
#

@earnest phoenix bot.guilds is a list of Guilds your bot is in. Use len() on it
@earnest phoenix A database with keeping all the data

#

By data I mean the channel the messages will be posted in, boolean value for switching the feature on/off

#

And etc

earnest phoenix
#

okay thankyou

#

would you still have to have a database for 1 server if i was to put it on my server first then maybe doing all that later?

slender thistle
#

I would recommend starting with a database

earnest phoenix
#

Umm

#

I'm talking about displaying number of bots in a guild

#

i know how to display guilds the bot is in, lol

slender thistle
#

Oops

earnest phoenix
#

okay

#

thanks @slender thistle

slender thistle
#

Iterate through guild members and see if member.bot is True

#

A list comp probably would do in your case

earnest phoenix
#

yea, i tried {len(guild.members.bot)} and it didn't work

slender thistle
#

A for loop

#

For each element in guild.members, check if member.bot is True

#

If yes, either add necessary info to a string or append to another list

earnest phoenix
#

len([x for x in ctx.guild.members if x.bot])

#

i got it

#

thx

short harbor
#

@glass atlas, I don't know if any other methods from the top of my head.... is there some way you can have a print statement help you?

glass atlas
#

Nvm It worked

short harbor
#

Awesome!

earnest phoenix
#

so ive got a urban dictionary cmd that works but how can i filter it or w/e and make it so nsfw words cant be searched in sfw channels

lusty dew
#
.setAuthor(message.author.tag, message.member.displayAvatarURL)
#

I kept getting error

short harbor
#

What library and language are you using?

lusty dew
#

D.js

buoyant wagon
#

message.author.displayAvatarURL

lusty dew
#

Oh shoot

#

I forgot to change that

short harbor
#

Glad to know it was a tiny mistake

lusty dew
#

(node:1412) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body embed.footer.icon_url: Not a well formed URL.

#

I still get that error

short harbor
#

With the same code snippet from above?

lusty dew
#

Yea

#

except replace

#

member with author

#
.setAuthor(message.author.tag, message.author.displayAvatarURL)
sturdy merlin
#
.setAuthor(message.author.tag, message.author.avatarURL)
lusty dew
#

That doesn't work

high lava
#

That says the footer is wrong. Not the Author

lusty dew
#

There is no url in the footer?

buoyant wagon
#

what is the footer

lusty dew
#

.setFooter("Requested by: ", message.author.tag")

high lava
#

The tag isn't a url. Lol

#

That's the error

lusty dew
#

Oh GWqlabsThonkery

#

I didn't know things had to be a url in the foother

#

footer

high lava
lusty dew
#

Ah shit

high lava
#

It's text and then icon

lusty dew
#

my bad

#

Forgot

high lava
#

Yeah. Lol

lusty dew
#

forgot it had two params

#

xD

buoyant wagon
#
.setFooter(`Requested by: ${message.author.tag}`)```
lusty dew
#

or do a +

#

for string concatenation

buoyant wagon
#

ik

junior summit
#

where is the best region to host a vps

quartz kindle
#

china

thin umbra
#

Pls search

junior summit
#

lol

grim aspen
#

you lost?

scarlet bane
#

using `` but also using brackets

scenic kelp
#

Smh do you understand JS syntax

scarlet bane
#

i forgot that `` formats it as a dumb array xd

scenic kelp
#

Wut

scarlet bane
#

Smh do you understand JS syntax?

idle basalt
#

`` is so stupid in js

scarlet bane
#

^

scenic kelp
#

How tho?

zealous veldt
#

How so? I find it quite useful

idle basalt
#

basically, it outputs an array of everything around template literals and a list of template literals

#

when you call it that way

#

its hard to explain without examples

scenic kelp
#

Ahh I see now

inner jewel
#
x`a${b}c` == x(["a", "c"], b)```
idle basalt
#

its why you can do something like str.split`` and get a string split by every char

#

^ yes

#

if you wanna play with it, use thisjs function x(a, ...b) { console.log(a, b); } x`pass stuff ${here}`;

scenic kelp
#

Never realized that was a thing

idle basalt
#

i learned about it because .split`` and .join`` saves you 2 chars each in golf

scarlet bane
#

right but if you used an actual good language you'd save much more than that

#

๐Ÿ‘

scenic kelp
#

Go shit on PHP

scarlet bane
#

no php is better than js

idle basalt
#

what if its a js golf challenge

#

pleb

scarlet bane
#

then stop doing shitty codegolfs?

idle basalt
#

i cri

#

i golf in binary

grim aspen
#

cries in binary

slender thistle
#
>>> me.lurking_status
True
bright spear
#

Yes, no php is better than js because js is better than all php

scarlet bane
#

No

#

Php > js

amber fractal
#

console.log(php > js) //expected output false

scarlet bane
#

acktually

#

that will wont work

#

beckus php > js is ackyually true

sinful lotus
scarlet bane
#

see?

amber fractal
#

Well the char codes are higher

#

Not a fair comparison

#

Incomparable results

#

Also it was evaled by a weeb bot mmLol

#

And those are strings I wasnt using strings nerds

sinful lotus
amber fractal
#

I had it defined in my mind

lusty dew
#

How could I check if what they say

#

equals something?

sinful lotus
#

===

#

or ==

lusty dew
#

so like if they were using a command like -volume 0 and I am trying to set a limit between 0-200

#

how can I check if what they say is between that?

sinful lotus
#
if (input > 0 && input <= 200) {
  // adjust volume
} 
dull bobcat
#

You also might wanna use an else statement ^

sinful lotus
#

you dont need to put else there Thonk

#

unleess you want to inform someone about the possible choice

#

but he didnt ask for that instead he just wants to know if its between that

lusty dew
#

Ah thanks

dull bobcat
#

I just gave a suggestion

lusty dew
#

I won't be needing an else though

sinful lotus
#

just answer what the person asked because adding a lot of things can get it confusing

dull bobcat
#

So what do you do if input is 0? @lusty dew

lusty dew
#

Then you turn the volume to 0

sinful lotus
#

if you want to include 0

dull bobcat
#

That if statement wont work with a 0

sinful lotus
#

put = on input >= 0

lusty dew
#

Yea

sinful lotus
#

but lmao just let them choose between 1-200 because 0 is essentially wasting your resources

lusty dew
#

I was going too

#

I was just joking

dull bobcat
#

Also, if input is a text instead of a number, it would crash :)

#

Thats why u wanna use else

sinful lotus
#

what

lusty dew
#

There would be no point in making it 0 might as well just stop or pause the song at that point

sinful lotus
#

"how"

#

explain

lusty dew
#

Also

#

when you type a number

#

isn't it already an int

sinful lotus
#

that wont crash

dull bobcat
#

It will

lusty dew
#

How?

sinful lotus
#

it wont

lusty dew
#

It would just error

dull bobcat
#

Well, yeah that ^

lusty dew
#

But I am pretty sure

#

when you type in a number

#

it is an int

#

not a string

#

iirc

dull bobcat
#

It is

sinful lotus
dull bobcat
#

But if the user puts a text instead of a number betwen 1-200 you would get a error

sinful lotus
#

please do research before you answer

#

kthx

dull bobcat
#

Tf u talking about, you guys have misunderstood me ffs

sinful lotus
#

it will output false and not execute the code inside the {}

#

how will it crash?

dull bobcat
#

God

lusty dew
#

I mean

#

if it makes you feel better

dull bobcat
#

The command wont work

#

Nigga

lusty dew
#

Oh shoot

sinful lotus
#

It wont work because you inputted a text

lusty dew
#

Using big boy words now

dull bobcat
#

Yes

scarlet bane
sinful lotus
#

the condition will output false

scarlet bane
#

Don't say that in here

#

It will get you banned

#

Just warning you

sinful lotus
#

and WILL NOT EXECUTE THE CODE INSIDE {}

lusty dew
#

Lel

sinful lotus
#

so it will not crash

lusty dew
#

Rip

scarlet bane
#

@bitter sundial racist words in here

#

2ce

sinful lotus
#

smh answering questions when you dont have enough knowledge of js

dull bobcat
#

Jesus christ the command wont work, it wont execute if the input is a text

#

Im black though wtf

lusty dew
#

No shit

sinful lotus
#

ofc, it wont

lusty dew
#

We already established that

sinful lotus
#

and thats what we want

#

what are you on to?

#

crash?

#

smh

dull bobcat
#

Scroll up and reread what i said

languid dragon
#

@dull bobcat doesn't change anything, please leave that kind of terminology out of here
If you repeat this it'll be a very extensive mute

high lava
#

Fun fact, I'm black and I still don't say that because of rules

#

Weird thing, right?

scarlet bane
#

@languid dragon literally told him that and he said it just to spite me LUL3D

sinful lotus
#

how would it crash if it will not change the volume on text

dull bobcat
#

YEAH READ WHAT I SAID AFTER

sinful lotus
lusty dew
dull bobcat
lusty dew
#

Wut you said after was

sinful lotus
#

before you answer please do research instead of arguing / saying banned words in here

lusty dew
#

"It will"

scarlet bane
#

Arguments are worthless without examples and evidence

#

"It will"
"it wont"
"it will"
"it wont"
does literally nothing

#

Saya provided evidence

lusty dew
#

I was joking...

scarlet bane
#

if you want to refute their argument, respond with something intelligible, not the n word.

lusty dew
#

๐Ÿ‘€

scarlet bane
#

im talking to him, not you

lusty dew
#

Oh

scarlet bane
#

ye

lusty dew
#

Lol

#

SO basically like that?

#

*oof

#

did not mean to post the whole thing

#

Oh ell

#

LOL

#

Hm, it doesn't seem to be working.

#

No errors at all

sinful lotus
#

show code for better debug

lusty dew
#
const Discord = require('discord.js')

module.exports.load = (client) => {
    client.commands[`volume`] = {
        conf: {
            name: "Volume",
            desc: "Sets the volume of the bot",
            usage: "-volume 1-200 or @Clap Bot volume 1-200"
        },
        async run(message, args){
            let input = args[1]
            const player = client.music.players.get(message.guild.id)
            if(!message.member.voiceChannel) return message.reply("You need to be in a ``VOICE CHANNEL`` to use this command")
            if(!message.guild.me.voiceChannel) return message.reply(client.user.username + " is not in a ``VOICE CHANNEL``")
                
            if (input > 0 && input <= 200) {
                player.setVolume(input)
            } 
        }
    }
}

using (https://npmjs.com/package/lavalink)

sinful lotus
#

parse the input first

#
const volume = args.slice(1).join(' ') 
if (!volume)
    return await msg.channel.send('')
const parse = parseInt(volume)
if (isNaN(volume))
    return await msg.channel.send('')
if (parse >= 1 && parse <= 500) {
    if (!queue.songs.length) return
    queue.player.volume = parseInt(volume)
    queue.player.lavaplayer.volume(parseInt(volume))
} else await msg.channel.send('')

Use this as your reference

#

instead of parseInt you can use Number() but depends on what you want to acheive

#

works eitherways

lusty dew
#

What does Number() do?

#

I only know what parseInt does

sinful lotus
#

basically converts the string into number

#

if you input something like 9a it will output NaN where in parseInt will output 9

lusty dew
#

Ah

#

Yea I want parseInt

#

lol

sinful lotus
#

well if you input 9, Number will output 9 in integer

lusty dew
#

Yea

#

I honestly forgot when using if statements

#

you didn't have to use {}

#

if you are going to only do one line of code for that if statement

sinful lotus
#

if one liner

#

you dont need {}

lusty dew
#

Yea

#

I forgot you could even do that xD

sinful lotus
#

if (true) stuff()

lusty dew
#

yea

#
            if(!input)
                return await message.channel.send("You need to supply a volume between 1-200")
            const parse = parseInt(input)
            if(isNaN(input))
            if (input > 0 && input <= 200) {
                player.setVolume(input)
            } 
#

SO basically this?

#

and replace

#

innput in the setVolume

#

with parse

sinful lotus
#

is NaN is useless there

#

since you said you want it to work even on 9a

#

inputs

lusty dew
#

Oh I did?

#

If so I didn't mean to word it like that

#

xD

junior summit
#

btw yea it was the internet

sinful lotus
#

you can use Number instead

lusty dew
#

Ah okie

sinful lotus
#

if you dont want it to work that way

lusty dew
#

so basically Number(input)

sinful lotus
#

then

const parse = parseInt(input)
if(isNaN(parse)) {}
#

use {} on isNaN because you have another if statement inside of it for the readability of your code

lusty dew
#

Oh?

#

I have another if statement inside isNaN?

sinful lotus
#
if(isNaN(input))
            if (input > 0 && input <= 200) {
                player.setVolume(input)
            } 
#

the second if there is your second if statement

#

or if you want to shortcut it

#
if (isNaN(parse) && (parse > 0 && parse <= 200)) player.setVolume(input)
lusty dew
#
            if(!input)
                return await message.channel.send("You need to supply a volume between 1-200")
            const parse = Number(input)
            if (isNaN(parse) && (parse > 0 && parse <= 200)) player.setVolume(input)
sinful lotus
#

dont use input use the parse on setVolume

lusty dew
#

Shit

#

I forgot to change it

sinful lotus
#

you are making the parsing of number useless if you do that

lusty dew
#

Yea

#

True

#

Sorry my bad

#

I didn't notice it lol

scarlet bane
#

tfw Number(input) instead of parseint(input)

#

what kind of newage shit is this

sinful lotus
#

Number dont allow letters with number

#

while parseInt allows it

lusty dew
#

Ima test it out now

#

My bot told me I had to pick a number between 1-200 even though I put 2

#

UwU

lament meteor
#

wait @lusty dew isNaN means is not a number in ur code uh... u made it so it only sets if it is not a number

sinful lotus
#

@lusty dew add ! infront of IsNaN

#

if that works then I probably memed out

lusty dew
#

yeet nope

#

Still no work

languid dragon
#

volume works between 0 and 1

#

0.1 would be 10% volume

#

are you appropriately setting the volume between 0 and 1?

#

or are you setting the volume between 0 and 200

lusty dew
#

I didn't know that is how the volume worked oof

languid dragon
#

what you should do is

let volPercent = volume * 100;

// do something with volPercent / set the volPercent with a new value

player.setVolume(volPercent / 100);
#

or something along those lines

#

im not sure how well Javascript handles decimals

lusty dew
#

I am also using

#

lavalink

#

which has it's own volume thing iirc

languid dragon
#

so you're not using the dispatcher provided by d.js?

lusty dew
#

No

#

I am using lavalink

languid dragon
#

1 sec

lusty dew
#

that is the package

languid dragon
#

yeah i figured

sinful lotus
#

@lusty dew could you show what the const parse in console.log ?

lament meteor
#

@languid dragon uhh ur code is basicly doing nothing cause u multiplied by 100 then divided by 100

#

??

sinful lotus
#

wait did he multipy it

languid dragon
#

// do something with volPercent / set the volPercent with a new value

lament meteor
#

o

languid dragon
#

i was referencing the way i handled it with my bot where i would get the value as a 0.4 or 0.5
i would then need to multiply by 100 to get it to a percentage and handle the percentage for ease of adjustments
the way my volume command worked is that it would slowly increment the volume by 10% until it reached the desired amount
so it needed the round numbers because added 0.1 to 0.1 is a nightmare with javascript IIRC

lament meteor
#

oo

sinful lotus
#

well on lavalink at least I never used that but on d.js voice

#

depends

#

honestly

lusty dew
#

@sinful lotus It logged 0

languid dragon
#

i feel like it would be similar, have you tried setting the volume with decimals?

sinful lotus
#

@lusty dew what was your input? 0

lusty dew
#

No

#

10

sinful lotus
#

could you show the code

#

I think it could be on how you feed it the data

languid dragon
lusty dew
#
const Discord = require('discord.js')

module.exports.load = (client) => {
    client.commands[`volume`] = {
        conf: {
            name: "Volume",
            desc: "Sets the volume of the bot",
            usage: "-volume 1-200 or @Clap Bot volume 1-200"
        },
        async run(message, args){
            let input = args.slice(1).join(' ') 
            const player = client.music.players.get(message.guild.id)
            if(!message.member.voiceChannel) return message.reply("You need to be in a ``VOICE CHANNEL`` to use this command")
            if(!message.guild.me.voiceChannel) return message.reply(client.user.username + " is not in a ``VOICE CHANNEL``")
                
            if(!input)
                return await message.channel.send("You need to supply a volume between 1-200")
            const parse = Number(input)
            console.log(parse)
            if (!isNaN(parse) && (parse > 0 && parse <= 200)) player.setVolume(parse)
        }
    }
}
sinful lotus
#

could you log the args for me

#

when you used the command?

#

because if parse is 0 then it could be messeing it input up

lusty dew
#

you want me to log input?

sinful lotus
#

yeah try

#

wait a second

#

how did you console.log parse

#

if it returns in return await message.channel.send("You need to supply a volume between 1-200")

lusty dew
#

The log was empty

#

input logged nothing

sinful lotus
#

then the problem is your args

lusty dew
#

Alright

#

I think I fixed it

#

instead of args.slice(1).join(" ")

#

i just did

#

args[0]

languid dragon
#

LOL

#

I WAS JUST ABOUT

#

TO SUGGEST THAT

#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

lusty dew
#

xD

languid dragon
#

why not just


// assuming args is an array and the first argument would be the user's input for volume

if (args) {
    const player = client.music.players.get(message.guild.id);
    const toSet = Number(args[0]);

    if (!isNaN(toSet) && toSet > 0 && toSet <= 100) {
        player.setVolume(toSet);
    } else {
        // handle invalid number error
    }
} else {
    // no args error
}
lusty dew
#

xD

languid dragon
#

i was writing something up to help you understand the code and read it a lot easier

sinful lotus
#

wait you copied my whole code?

#

I parse my args differently lmao

#

you shoudnt have copied my args.slice()

lusty dew
#

I was just doing whatever tbh

#

It is almost 12am

#

I am ready for bed

#

xD

#

Yeet vvolume is working

#

Thanks!

lusty dew
#
if (message.guild.me.voiceChanel) return message.reply(client.user.username + " is not in a ``VOICE CHANNEL``")

Alright so it says this message when it leaves but if you do it again, it says the message again even though it has already left

#

I can't seem to figure out how to make it only say it when it leaves

#

Should I make a second if statement?

#

and just check the opposite of what it is checkiing now and send different message

sinful lotus
#

spelling

lusty dew
#

Hm?

bright spear
#

You typed chanel instead of channel

lusty dew
#

shit

#

Lol

#

I swear typos always get me

bright spear
#

Also that will error if the bot is in a voice channel

lusty dew
#

Yea, I know.

#

Which is another reason why I was asking

#

lol

sinful lotus
#

add !

lusty dew
#

I did

sinful lotus
#

did you correct the spelling?

lusty dew
#

Yea

echo pasture
lusty dew
#

Lol

#

You a bit late to the part

#

:p

sinful lotus
#

that would return if the bot isnt in a channel

lusty dew
#

party*

sinful lotus
#

but if its in a channel

#

it woudnt

echo pasture
#

hah its a party than Thonkeyes

lusty dew
#

Yea

#

Ya didn't get the invite?

#

Also yea

#

I used the same thing for my join channel cmd

#

Which I just thought about

#

I could have used that as reference

earnest phoenix
#

can someone help me with making it so u cant use the urban dictionary with nsfw content in sfw channels? using discord py rewrite

slender thistle
#

channel.is_nsfw()

lofty hamlet
#

Hi

#

if (xo03.content("KYOGRE")) does not work

#

let xoargs = message.content.split(" ").slice(1); let xo03 = xoargs.join(" ")

rose mesa
#

๐Ÿค” why ur doing content("") dirently like that ;-;

lofty hamlet
#

?-?

rose mesa
#

i havent dont much checking of msg content but i think its something like:

if(xo03.content == "whatever"){

} else {

}
#

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

lofty hamlet
#

AH bruh xuse me i'm stupid

rose mesa
#

normally it would be soemthing like that ๐Ÿค”

#

i hope u know this: but the else is completly optional xD

lofty hamlet
#

else if (xo03.content == "RAYQUAZA") { is not detect ๐Ÿค”

rose mesa
#

๐Ÿค”

#

T.T
mdr... jai juste fini le classe de francais.... -_-

#

๐Ÿค” @lofty hamlet just to make sure... u did add the pokemon to ur data files right?

#

๐Ÿค” nvm read code a bit wrong xD

#

do the other "pokemon" names work or not?

lofty hamlet
#

@rose mesa what where is the error ?

rose mesa
#

thats my question is a way also, since i dont even know what error codes u gettings xD

#

cause telling me just it wasnt dected doesnt really help :3

lofty hamlet
#

Hein T-T ?

#

It's my code

rose mesa
#

thats code ๐Ÿค” not the error code -_

lofty hamlet
#

I have no error

rose mesa
#

oof

#

i love those types of errors xD

lofty hamlet
#

๐Ÿ˜‚

rose mesa
#

๐Ÿค” try running the code solo,

#

meaning: just run rayquaza alone

lofty hamlet
#

Run ..

inner jewel
#

xo03 is a string already

#

you don't do "a".content == "a"

#

you just compare directly

lofty hamlet
#

So how can I do?

#

@inner jewel

scarlet bane
inner jewel
#

you just compare directly

#

also don't randonly ping

lofty hamlet
#

You respond me it's not a random, ping

scarlet bane
#

i mean its not that random of a ping, more of a follow up asking a question that was already answered

lofty hamlet
#

else if (xo03 == "GROUDON") {

#

But not work

lament meteor
#

@uneven laurel add .js at the end and try not to hv spaces in file names

midnight oxide
#

So I know that urban dictionary should only work in NSFW channels but what about Oxford dictionary?

rose mesa
#

fek thats white af o,o

lusty dew
#

Does anyone know what redis is?

zealous veldt
#

Yes,

lusty dew
#

What is it?

earnest phoenix
lusty dew
#

uses it

#

cause*

#

Ah mk

#

I will try and figure out how to use it in lavaqueue

#

I am pretty sure I can add onto my already lavalink manager code

#

that has the same function just needs the redis added on

inner jewel
#

just keep the queue in your bot

#

an array can be used

#

redis is overkill unless you have a microservice bot/want to persist queues across restarts

zealous veldt
#

To anyone who has experience using IPC with NodeJS, I'm trying shard my bot across totally independent (non-child processes) processes. Where each process is a shard. I've made the actually logging in as one shard part, etc. work fine, but I've come to the point where I need to have my shards communicate with each other. My current plan is to build a central process that acts as an intermediary and which all shards communicate with via IPC when they need to execute something on another shard, etc. I'm having trouble with getting IPC to work through the node-ipc module. As of yet, I haven't found much online that covers having a more two-way relationship between the processes, most of what I've found has been on essentially one way IPC pipes. In order for this to work, I need to be able to have two-way communication between each shard and the intermediary process. If anyone knows any good ways to do this or can point me in the way of helpful resources on the topic of two-way IPC communication in Nodejs, I'd greatly appreciate it.

(Please tag me if you respond)

quasi forge
#

Hoping this helps

zealous veldt
#

I've looked at that article, the stuff they have didn't work for me, and it's not really as two-way as I need it to be

amber fractal
#

Make an api ez

zealous veldt
#

Too slow

quasi forge
#

Oh

zealous veldt
#

I need this for inter-shard communication

scenic kelp
#

Would a localhost websocket work?

zealous veldt
#

No

#

Too slow

quasi forge
#

It either doesn't work or is too slow... Thonk

hushed berry
#

@zealous veldt why do they need to communicate?

quartz kindle
#

how about a pub/sub realtime database?

hushed berry
#

how about just a message broker? lmfao

languid dragon
#

Use fork() and the attached IPC

hushed berry
#

I don't think you're gonna find anything if a localhost ws is too slow

languid dragon
#

It's a separate process but because it's a child you keep the communication channel

hushed berry
#

Also, any IPC solution is not going to work if you ever want to spread the bot across multiple machines

#

well

#

i guess techincally normal http requests are ipc

#

but you get what i mean

languid dragon
#

Wouldn't ws done right work fine?

hushed berry
#

yeah

#

but

#

that is def not the route i would go

#

id look into the reason why you need intershard communication in the first place

languid dragon
#

I think for node.js it's probably one of the most practical for cross process communication

hushed berry
#

tbh, you could even use rest for smth like this

earnest phoenix
#

How do i set the CAN_VIEW voice channel permission for a certain user to false?

hushed berry
#

with what? @earnest phoenix

earnest phoenix
#

Discord.js

#

Also, How would i send a message to every guild my bot is in?
No, I am not trying to make a spam bot, I am trying to alert server admins about an update to the bot.

#

that is still spam

#

I plan to use it once.

#

does it change the fact its spam

inner jewel
#

put it in the status, send it once when a command is executed, lots of options

earnest phoenix
#

I would beg to differ on the definition of spam, But we all have different definitions.

#

alert your users through a central guild/bot playing status/commands

inner jewel
#

but global messages will ratelimit you to hell

#

and it is spam

#

it's not a subjective definition

earnest phoenix
#

Bot rate limits are per server?

inner jewel
#

it's what discord defines as spam

earnest phoenix
#

Or is there a global rate limit in general?

inner jewel
#

there's a global ratelimit

earnest phoenix
#

Ah

inner jewel
#

and per-route limits

earnest phoenix
#

What is that rate limit?

inner jewel
#

whatever discord feels like

#

usually 50/1s

#

but they can be anything and change at any time

earnest phoenix
#

Bot is in less then 50 servers atm

#

no strict definition, all ratelimits are dynamic

unreal rampart
#

adjective
( lowercase ) Digital Technology . (of promotional content on the Internet) irrelevant or misdirected:
The search engine delivered spam websites that had nothing to do with my keywords.

#

would the message be misdirected or irrelevant to the bots' users?

earnest phoenix
#

I would assume not as it alerts all users of the update, As it is a pretty big update.

unreal rampart
#

we also have the definition:

#

( lowercase ) Digital Technology . to execute (an action) or use (an item) rapidly or repeatedly in a video game:

#

but i mean

#

if we just exclude the video game part

#

you are kinda executing the command 50 times

earnest phoenix
#

My message would be a simple;
Hey! I've been updated! [insert new features], Server admins, to disable these do [command].

latent willow
#

post the message in your support server

earnest phoenix
#

Relevant to the bot, Relevant to the users.

#

It has like 5 members lol

#

The bot is in 46 servers.

unreal rampart
#

@latent willow i agree

earnest phoenix
#

my message content could be hi or a copypasta, but it wouldnt matter if i started sending it in every guild i am in

hushed berry
#

um

earnest phoenix
#

wrong chat?...

unreal rampart
#

hahaha wtf

earnest phoenix
#

Also, While some people are here, Could someone provide me with the code to move a user into a specified voice channel? (discord.js) Thanks!

unreal rampart
#

oof

latent willow
#

@earnest phoenix even if it is in 5 guilds your bot will most likely grow and you'll hit ratelimits pretty fast if you spam like that
Also ppl will recognize new features if they use your bot alot and might join your server in the future

unreal rampart
#

bot.move_member(user, channel)

earnest phoenix
#

Oh, I only plan on doing this once as i am adding like 20 new features to a currently 1 command bot.

#

using the docs tm

#

Thanks btw!

latent willow
#

then they will defenetly recognize it ^^

late hill
#

Announce in support server / add to commonly used commands

inner jewel
#

users usually don't care if you added something

#

if they do and want to be notified, they join the support server

late hill
#

The ones who do care will most likely be in your support server

#

yeh

inner jewel
#

otherwise they eventually find out if the command is listed in eg help

earnest phoenix
#

Fairs.

hushed berry
#

tbh you may lose servers by sending out mass messages

earnest phoenix
#

and sending update messages will lead people into kicking your bot from their guild

#

exactly

earnest phoenix
#

anyone know why heroku wont run it?

idle basalt
#

no

late hill
#

Read the error I guess

#

Seems like you'll have to install py

#

?

blazing star
#

if you want to run python run it with python or python3 and -3 isnโ€™t a argument

rustic axle
#

I need help with a matchmaking system. I already have 2 arrays, a lobby full of people waiting to be matched and another one with people already matched. I am using discord.js. I am unsure of how exactly I should go about it. I have tried several iterations (which have all failed).

opaque eagle
smoky spire
#

Has only takes ids because they're keyed by id

#

@opaque eagle

opaque eagle
smoky spire
#

Well I think adding .id will solve ur ts problem

opaque eagle
#

Well the error says it isn't assignable to User | GuildMember | Role | GuildChannel (so string isn't an option).

smoky spire
#

Hm idk then

opaque eagle
#

Ty for trying

frozen tiger
#

Uh, I need some help about lavaplayer. My bot just stopped working with music by itself and I really don't know why... Lavaplayer is up ot date, I tried to run my jar locally and everything is just fine BUT on my VPS no music get played and the bot keeps going connected/disconnected in the vocal channel...

#

So I think my VPS is the problem but I litterally didn't do anything..

buoyant wagon
#

whats the difference between <@userid> and <@!userid> im just curious ๐Ÿค”

frozen tiger
#

No really big deal

#

Should do the same job

buoyant wagon
#

ok...

smoky spire
#

The ! Is for nicknames

earnest phoenix
#

Hello can I make like, You spawn a photo of something else and then you catch it and then the thing gets to your collection

#

the codes actually

#

If anyone knows pokecord, it's the similar thing I am saying

amber fractal
#

So literally what pokecord does Thonk

earnest phoenix
#

I can't explain

#

like a image appears and then you do a command to add to your collections and it gets added
Somehow that

amber fractal
#

Send the message, save the details of the latest of whatever that thing is, on a successful "catch" refer to that data to add the thing to the users collection

#

It is entirely possible, idk how in py tho

earnest phoenix
#

maybe discord js

#

but thx

rustic axle
#

Going to repost it here for like the 3rd time

#

I need help with a matchmaking system. I already have 2 arrays, a lobby full of people waiting to be matched and another one with people already matched. I am using discord.js. I am unsure of how exactly I should go about it. I have tried several iterations (which have all failed). Ping/DM me if you think you can help. Thanks in advance

shrewd lintel
#

you what

rustic axle
#
let lobby = []
let groups = []

Lobby has users waiting to be matched
Groups has players already matched

How do I make it so that people can be matched from the lobby, added to the groups and put in a DM group

shrewd lintel
#
[[a, b, c], [d, e, f], [g, h, i]]
```?
rustic axle
#

The groups array would look like that yes.

#

But I am just confused on the process

summer gulch
#

nice

earnest phoenix
#

oh fun

#

my discord bot just got temp banned from discordbots.org for "ratelimiting" Funny that as i have no where near your rate limit!

#

You're stopping my bot from even running fml

#

when are you sending requests to it

#

?

#

do you use the dbl api?

#

Yes

#

dblapi.js

#

how often do you call it

#

once every 10 min max

amber fractal
#

You're using js right?

earnest phoenix
#

Yup

#

discord.js | dblapi.js | and no where near the rate limit

inner jewel
#

you did something else that got cloudflare angry at you

#

a dbl ratelimit would be a 429

amber fractal
#

Was talking to Eare

earnest phoenix
#

Well what did I do

#

It says that the owner of discordbot list did it

amber fractal
#

1015 is temporary

#

Lasts up to an hour

earnest phoenix
#

DDoS protection?? Honestly kill me, I didnโ€™t realise sending 1 request/10 min was a DDoS

#

Iโ€™m gonna set up a logging system so I can see just how many requests it is sending because I refuse to believe cloud fair thought I was DDoSing.

inner jewel
#

all requests to discord are also sent to cloudflare

amber fractal
#

Does cloudflare do it by service or just ip?

#

I would assume it's by service

earnest phoenix
#

Service

#

I have a few other bots, including the backup of the bot that got blocked running on the same VPS, they all work.

buoyant wagon
#

i think this sounds like a stupid question but how do you check if a bot has certain permissions in d.js?

buoyant wagon
#

ok thx

earnest phoenix
#

Yo, my bot should be unrestricted now, right?

lusty dew
#

Anyone have experience with lavaqueue?

earnest phoenix
#

I'll answer my own question - No, It's still blacklisted.

spring ember
#

@lusty dew what about it?

lusty dew
#

I am trying to implement a queue system with it

#

and I am curious how it works with the lavalink module if it does at all

spring ember
#

Lavaqueue is an implementation though

#
constย {ย Client:ย Lavaqueueย }ย =ย require('lavaqueue');

constย voiceย =ย newย Lavaqueue({

ย ย userID:ย '',ย //ย theย userย thatย willย beย sendingย audio

ย ย password:ย '',ย //ย yourย lavalinkย password

ย ย hosts:ย {

ย ย ย ย rest:ย '',ย //ย yourย lavalinkย restย endpointย (includeย portย andย protocol)

ย ย ย ย ws:ย '',ย //ย yourย lavalinkย wsย endpointย (includeย portย andย protocol)

ย ย ย ย redis:ย '',ย //ย yourย redisย instance

ย ย },

ย ย send(guildID,ย packet)ย {

ย ย ย ย //ย sendย theย packetย toย theย appropriateย gatewayย connection

ย ย },

ย ย advanceBy(queue,ย {ย previous,ย remainingย })ย {ย //ย optional

ย ย ย ย //ย calledย atย theย endย ofย aย trackย whenย theย queueย isย otherwiseย unawareย ofย howย manyย tracksย to

ย ย ย ย //ย advanceย by;ย returnsย aย number:ย 0ย toย repeat,ย negativeย toย advanceย inย reverse,ย positiveย to

ย ย ย ย //ย advanceย forward

ย ย },

});

ย 

asyncย functionย connect()ย {

ย ย constย resย =ย awaitย voice.load('someย identifier');

ย ย constย queueย =ย voice.queues.get('someย guildย ID');

ย 

ย ย awaitย queue.player.join('channelย id');ย //ย joinย theย voiceย channel

ย ย awaitย queue.add(...res.tracks.map(tย =>ย t.track));ย //ย addย songsย toย theย queue

ย ย awaitย queue.start();ย //ย startย theย queue

}

ย 

asyncย functionย skip()ย {

ย ย awaitย voice.queues.get('someย guildย ID').next();

}

ย 

asyncย functionย stop()ย {

ย ย awaitย voice.queues.get('someย guildย ID').stop();

}
unique nimbus
#

oof

earnest phoenix
#

can you like

#

not clutter the chat with codeblocks

scarlet bane
#

that's kinda the point of this channel

earnest phoenix
#

it is really not

scarlet bane
#

How will you help him with code problems without seeing his code

#

Please explain

#

I need to learn your telepathic ways

earnest phoenix
#

text sharing services e.g hastebin

#

:thinkderp:

scarlet bane
#

Right, let me just spin up hastebin for a single snippet that fits in here just fine

grim aspen
#

that's for very long pieces of code

scarlet bane
#

Which slows down everything because then anyone that wants to help has to use hastebin as well

grim aspen
#

short code you can use codeblocks

scarlet bane
#

Instead of using the feature built into discord

fiery birch
#

@earnest phoenix hi friend, code blocks are here to share code

#

we allow that

#

thanks

scarlet bane
#

lmao

earnest phoenix
#

they clutter literally everything

#

lol

fiery birch
#

thats cool to know

scarlet bane
#

Lmfao

fiery birch
#

we allow them though

scarlet bane
#

LMFAOOOOO

#

@fiery birch

fiery birch
scarlet bane
#

ur cute tbh

fiery birch
#

heheeee

scarlet bane
#

tfw a whitename thinks he owns the place

earnest phoenix
#

yall wondering why so many low iqs are here and it shows why ๐Ÿคท T

fiery birch
#

LMFAO

#

ok buddy

scarlet bane
#

Yeah why are you here

earnest phoenix
#

@scarlet bane i lead a 1.8k guild bot but killed it because why not

scarlet bane
#

tbh

#

Ok

#

Cool

#

Who asked?

fiery birch
#

you're a monster aren't you

grim aspen
#

my excuse is i know js but i make a bunch of errors

scarlet bane
#

We don't need excuses to be better than some cocky showoff who thinks he's head of discord

#

lmao

earnest phoenix
#

yes i am

#

and i am the queen of england

grim aspen
#

press x to doubt

scarlet bane
#

still didnt ask tbh

earnest phoenix
#

all i asked was not to clutter the chat, not demanded, asked, because it's annoying on mobile and yall be triggered as fuck

fiery birch
#

@scarlet bane just flex tony on him

scarlet bane
#

nah

#

he'd cry

fiery birch
#

no one is triggered here im not sure what you're on about

#

LMFAO

scarlet bane
#

He's triggered and he's reflecting so fucking hard

#

im laughing my ass off

earnest phoenix
#

remind me again but we're arguing right now because of simply asking not to clutter

#

lolk

grim aspen
#

i'm not sure where you got triggered from, we're just trying to help

scarlet bane
#

No, i told you that your suggestion was dumb

#

And you got super defensive

fiery birch
scarlet bane
#

Yeah thas all

earnest phoenix
#

yes

scarlet bane
#

not angry, just calling everyone retarded

fiery birch
#

or return to the topic of development now please

scarlet bane
#

Not angry, just flexing my 1.9k member server that doesn't exist

#

oh, zoinks

earnest phoenix
#

passive agressive much

scarlet bane
#

shh

fiery birch
#

don't push matters here

grim aspen
#

i'm not in the mood for this

earnest phoenix
#

i added a comand of ping to my bot,but when i try to do it work it DOSEN'T work,what do i do?

#

it dosen't work,but it says that the bot is online

#

;n;

fiery birch
#

api might be dying

earnest phoenix
#

what

#

;n;

#

plase help me,i need to add comands to my bot,i added the comand of ping but it dosent work,What.do.i.do?

inner jewel
#

you can start by sending the code

#

asking again without giving details won't make it magically work

earnest phoenix
#

:b

grim aspen
#

what library are you using?

earnest phoenix
#

is the api dead?

#

yes

scarlet bane
#

possibly, according to some people

earnest phoenix
#

Okay, have we been given any official news?

grim aspen
#

my cat command doesn't work probably because of that

#

nvm

#

just fucking slow

earnest phoenix
#

Oh, i was talking about the dblapi

#

they have to. manually update the status page though so its not realtime

#

o my b

#

I should have specified.

#

what

#

tfk

grim aspen
#

what

earnest phoenix
#

I'm able to run my bot, but the second i try to run the same bot with some commands the bot gets blacklisted from dblapi

#

I'm just done

#

It thinks i am ddosing

#

with 1 request a minute

#

what even

#

are you using a shared/free hosting

#

No

#

hm

#

Private, my own VPS

#

thats really weird then, no idea what could be the cause

amber fractal
#

Wait

#

what provider?

earnest phoenix
#

The bot works, but when i change the code, Same token and all, It works for 2 minutes and 32 seconds then closes without telling me.

#

Contaboo

#

The strangest part is

#

Same bot, Same token, Same API key, Works fine, I add in some new code - that doesn't contact the api - bam i'm ddosing?

quartz kindle
#

just dont use dblapi then

amber fractal
#

he's trying to post stats

#

he's being blocked by cloudflare

quartz kindle
#

yeah, try without dblapi

lime geode
#

Ignoring exception in on_member_join Traceback (most recent call last): File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event yield from getattr(self, event)(*args, **kwargs) File "<string>", line 17, in on_member_join File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/client.py", line 2916, in add_roles yield from self._replace_roles(member, new_roles) File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/client.py", line 2887, in _replace_roles yield from self.http.replace_roles(member.id, member.server.id, roles) File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/http.py", line 196, in request raise Forbidden(r, data) discord.errors.Forbidden: FORBIDDEN (status code: 403): Missing Permissions

#

He has all perm...

slender thistle
#

Role hierarchy?

lime geode
#

What?

formal agate
#

how roles are positioned

#

Ok idk why I am getting this error from enamp but its driving me nuts. If im reading it correctly it is telling me that the key 264445053596991498 does not exist but my catch for it would have gone off and i have tested it before on other servers. SO idk what is going on. (node:5960) UnhandledPromiseRejectionWarning: EnmapTypeError: The key "264445053596991498" is not of type "Object" or "Array" in the enmap "guild_data" (key was of type "String")

amber fractal
#

It exists, but it's data is a string and not an object or array I believe is what that error is

lusty dew
#

Did anyone respond to me about the lavaqueue thing?

#

I fell asleep right after asking the question

formal agate
#

idk why it doesn't work for this server

#

this is the only one it breaks on

idle basalt
#

youll have better luck in the official support server for enmap

formal agate
#

they have none

idle basalt
#

im fairly certain evie has her own server and if not, she offers enmap support in the idiotsguide server

#

there should be links in the docs

formal agate
#

isn't the idiotsguide server down?

#

because there is no active invite i can find at least before

idle basalt
#

found you a link

formal agate
#

ooh

#

thank you

idle basalt
#

heres a link to her server as well

#

good luck :)

#

dont know if posting these servers counts as advertising but im not affiliated or anything

formal agate
#

it doesn't

#

the rules say you can post invites if it is relevant to the conversation

#

or maybe that was the discord.js server

#

i forget

idle basalt
#

eh whatever

#

if its a problem, theyll delete them

amber fractal
#

It was relevant and helpful

formal agate
#

yea

#

to both

amber fractal
#

Do you have an eval command?

formal agate
#

yes

amber fractal
#

Is your enmap global or does the enmap exist in the evals scope?

formal agate
#

wdym by in evals scope?

amber fractal
#

Does eval have access to the enmap

formal agate
#

yes

amber fractal
#

Try this !eval <Enmap>.get("264445053596991498")

#

Change the things to your stuff obviously

formal agate
#

ok

amber fractal
#

Tell me if it returns the error or something else

formal agate
#

ok

#

It returned fine

amber fractal
#

Can you screenshot it?

#

I think I know the error, but I'm not 100% yet

formal agate
#

Ok so itโ€™s returning but itโ€™s missing things

#

But my code handles it when itโ€™s missing items

amber fractal
#

What is it returning though?

formal agate
#

just starboard config stuff

amber fractal
#

But it is an object?

formal agate
#

Oh

#

The value is missing data

#

I think it may have corrupted or something

#

The second one is a normal server

amber fractal
#

The first one returned (assuming) a string

#

Which is what the error says

formal agate
#

Makes sense

amber fractal
#

You're trying to get a property from a string

formal agate
#

Yea

#

And itโ€™s missing an item

amber fractal
#

Which uHh afaik doesnt work mmLol

formal agate
#

Lol but Iโ€™m not trying to get โ€œstarboardโ€ anyway

amber fractal
#

But for some reason thats the only thing in that one

formal agate
#

Yea

#

So I purged the key

#

And just reset it

#

Everything works now

amber fractal
#

:+1:

formal agate
#

Thank you for basically solving this for me

#

I probably would have never figured this out

amber fractal
#

I've had the error before

formal agate
#

Ahh

lusty dew
#
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
April 3rd 2019, 11:09:09 pm :: Clap Bot has been put online.
C:\Users\Aj\Desktop\Clap Bot\commands\play.js:35
                                await queue.add(r.tracks[0])
                                ^^^^^

SyntaxError: await is only valid in async function```
#

II got two errors

#

the await one

#

I understand

#

the ioredis one I don't

#

I can see it had an error

#

connecting

#

I just don't see why

#
const Redis = require('ioredis')
const redis = new Redis()

module.exports = (client) => {
    const voice = new Lavaqueue({
        password: 'kawaiipanda',
        userID: '561619932442394627',
        hosts: {
            ws: "ws://localhost:2333",
            rest: "http://localhost:2333",
            redis: redis
        }
high lava
#

Is redis actually installed and running on the host?

#

That would be the first place to start looking

lusty dew
#

I installed redis

#

and I think it is unning

#

running

#

How could I check?

high lava
#

Looking at the documentation, try first doing src/redis-server in your terminal

#

And then do a test write with redis> set foo bar

#

If it says OK then it's running

lusty dew
#
operable program or batch file.```
high lava
#

oof. wait. cd to your redis directory

#

Where you extracted and ran make

lusty dew
#

make?

#

oof

high lava
#

Wait what

spring ember
#

Do redis-cli

lusty dew
#

I forgot to do that actually

spring ember
#

In the cmd line

#

It should connect

high lava
#

He didn't actually install it XD

#

oof

spring ember
#

Oh

lusty dew
#

I installed the files

spring ember
#

@lusty dew you need to run it in WSL

high lava
#

You had to extract and then run make in the extracted folder

spring ember
#

It requires a Linux environment

high lava
#

And yeah, you need linux

lusty dew
#

Ah mk

#

I will do that

spring ember
#

That's the reason I moved completely to Linux

#

Redis and other services made me

high lava
#

MongoDB bb

lusty dew
#

MongDB is good

spring ember
#

Mongo is for a different purpose

#

actualy there are better alternatives to bongo for each purpose

upbeat maple
#

Hey guys, am I missing something in the discord.js documentation to check if a user has unchecked "Allow direct messages from server members."?

#

The only solution I've found is to catch the error but I'd like to check beforehand...

mossy vine
#

I doubt you can

upbeat maple
#

Weird... I figured it'd be a property of the User or DMChannel

#

alright, I'll just keep the try/catch block then!

bright spear
#

I don't think that's even in the API @upbeat maple

upbeat maple
#

It does give a unique error...

#

(node:17439) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send messages to this user

#

But probably not

bright spear
#

When you try to send a msg in the client it just gives you the standard message fail error blobshrug

upbeat maple
#

Weird. Seems like a pretty global property of each user. it'd be nice to prepare the destination without needing the Discord API to throw an error

#

extremely rare case but still

lusty dew
#

How do I make a redis server?

spring ember
#

Download redis

#

Run redis-server program

#

Done

#

Also systemctl enable redis recommended

warm wigeon
#

Hey

#

anyone know how to make it so when you do !help your bot thinks it's !commands? Im using javascript

spring ember
#

@warm wigeon you mean aliases?

#

Probably make a map from each alias to its original name and forward it in the command handler

warm wigeon
#

Yeah

#

No idea how to do that, but I'll just copy the code

lusty dew
#

Rip

earnest phoenix
#

@warm wigeon easy dude

#

do you have handlers?

proud pivot
earnest phoenix
#

Can you send it in a code block or upload it to pastebin

dull bobcat
#

no pastebin ffs

#

use haste

proud pivot
#
#!/usr/bin/python3

#imports
import discord
from discord.ext import commands
from colorama import *
import asyncio
import youtube_dl

#Variables
prefix = '!'
bot = commands.Bot(prefix)
bot.remove_command('help')

voice_channel_id = "562699711275073566"

options = {
    'format': 'bestaudio/best',
    'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
    'restrictfilenames': True,
    'noplaylist': True,
    'nocheckcertificate': True,
    'ignoreerrors': False,
    'logtostderr': False,
    'quiet': True,
    'no_warnings': True,
    'default_search': 'auto',
    'source_address': '0.0.0.0' # bind to ipv4 since ipv6 addresses cause issues sometimes
}

#start
@bot.event
async def on_ready():
    await bot.change_presence(game=discord.Game(name='iloveradio.de', type = 2))
    init()
    print(Fore.GREEN + Style.BRIGHT)
    print(" ============================")
    print("  Bot Name: " + bot.user.name)
    print("  Bot ID: " + bot.user.id)
    print("  Discord Version: " + discord.__version__)
    print(" ============================")
    print(Fore.YELLOW)
    channel = bot.get_channel(voice_channel_id)
    botvoice = await bot.join_voice_channel(channel)
    player = botvoice.create_ffmpeg_player('http://stream01.iloveradio.de/iloveradio1.mp3', options=options,
    before_options="-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5")
    player.start()

#run
bot.run('XXXXXXXXXXXXXXXXXXXXXXX')
earnest phoenix
#

Did you copy the code

proud pivot
#

โซ

zealous veldt
#

That's not at all helpful or complimentary to this conversation @proud pivot

scarlet phoenix
#

Im looking for a new host, Has anyone used SkySilk?

grim aspen
#

yes

#

i still use it

slender thistle
#

Same there

scarlet phoenix
#

Any problems? I am looking at taking advantage of using the 50% off sale

slender thistle
#

I've had no problem so far

earnest phoenix
#

how i add a comand to my bot?,beacuse i tried to add him the comand of ping but i dosent' work (it says that is online but the comand dosen't work) the comand that i tried is ping

#

@earnest phoenix what library are you using for your bot

dusky marsh
#

And please, some code, just asking for help doesn't allow us to actually help

slender thistle
#

Let's rephrase that since it seems they don't know what a lib is

#

Discord library/module that you use in your programmnig language

earnest phoenix
#

visual studio code(?

languid dragon
slender thistle
#

That's your text editor

earnest phoenix
#

lol

#

yes but it dosen't work the comand @languid dragon

dusky marsh
#

Omg

languid dragon
#

because you dont know how to code

earnest phoenix
#

-n-

#

@earnest phoenix show your code without the token

#

ok

languid dragon
#

if you followed that tutorial you would know how to make commands work

earnest phoenix
#

never mind now it works

#

also that's JavaScript

slender thistle
#

Learning a programming language off a Discord library inb4

earnest phoenix
#

:v

dusky marsh
#

It's not an awful way to learn, since discord bots really are not very hard

slender thistle
#

I would say it's not much of a good way to learn a lang either

earnest phoenix
#

they still need to know the basics

hushed berry
#

its quite hard if you start from nothing

earnest phoenix
#

yup

dusky marsh
#

Yeah ofc they always learn the basics before attempting things, I'm just saying using discord as a way of progressing your knowledge isn't too bad an idea

earnest phoenix
#

:v

idle basalt
#

when you make a discord bot, youre primarily learning a lib

#

learning the basics is much more useful than learning the lib + some crap that makes no sense that youll copy/paste

earnest phoenix
#

Lovely! My bot has been offline all day, Finally started it up again and it was instantly ratelimited by cloudfair!

idle basalt
#

and it will save you a lot of stupid questions if you start with the actual language

earnest phoenix
#

Error 1015.

idle basalt
#

nice \n lul

slender thistle
#

Also knowing basics will in fact help you create a good Discord bot

earnest phoenix
idle basalt
#

yes that too. your bot will be ass without knowing the basics

earnest phoenix
#

their everywhere

idle basalt
#

and you will want to improve it, but to do that youll have to ask stupid questions and get answers that say "learn <insert lang>" or answers that go miles over your head

earnest phoenix
idle basalt
#

lmfao what a style choice

slender thistle
#

lmao

earnest phoenix
#

I started up the bot

#

For the first time in 12hrs

slender thistle
#

How do I use ifs in d.js smh

earnest phoenix
#

and get insta-banned

#

w h a t i s g o i n g o n ?

idle basalt
#

'Too Many Requests'

#

that looks like it might contain some information

#

nah fr though, ask a staff member or something

marble needle
#

inb4 is spamming api post requests from an infinite loop

idle basalt
#

haha yes

earnest phoenix
#

I have looked over my code and i can't see anything that would do that, Will look again

#

console.log (or what ever your language uses) near all your POSTs/GETs so you can see if any are spamming

#

Good plan.