#development

1 messages Β· Page 709 of 1

unique nimbus
#

yes

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

idk that

#

oof

#

typescript is a superset of javascript

#

it's not an entirely other language lol

quartz kindle
#

@tepid hedge did you install sqlite with npm? i only see you installing it with apt (which is completely unnecessary)

lapis meteor
#

Furryhook

#

Weebhook

mossy vine
#

@sage bobcat tsc --resolveJsonModule program.ts

lapis meteor
#

Webhook

sage bobcat
#

One message removed from a suspended account.

opaque eagle
#

It can also be added to your tsconfig.json

earnest phoenix
#

can you fetch a message written before your bot joined a server

peak bloom
#

yes

#

you can fetch any message that hasn't been deleted if you have read message history permission in the channel

earnest phoenix
#

Could someone send me the piece of code i need to check if a user voted for my bot (Javascript)

#

no

#

-_-

#

Really kind of you

unique nimbus
#

We don't spoonfeed

earnest phoenix
#

^ its a rule lol

unique nimbus
#

Channel for chatting about (bot) development. If you have questions, ask the questions and wait for someone who can answer to help you. Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem. Do not @mention people randomly.

earnest phoenix
#

Okay dicks. bye

unique nimbus
#

Thats not very nice :c

earnest phoenix
#

That makes two then

unique nimbus
#

smh

#

We don't spoonfeed

#

its a rule

earnest phoenix
#

If just the info on the site was more info giving then i didnt need help

unique nimbus
#

There are thousands of bots in JS who knows what to do

earnest phoenix
#

dbl docs have enough information

unique nimbus
#

wdym

earnest phoenix
#

don't blame dbl on your incompetence to write code

unique nimbus
#

Eventhough I agree that my code is shit

twilit rapids
#

@earnest phoenix there are examples on the docs that show how to do that

earnest phoenix
unique nimbus
#

yes

earnest phoenix
#

don't think i'll ever get to used to that

#

gg TLDs are cool tbh

#

big oof if they ever drop the discordbots name

#

dbl is very inconsistent with it

#

they call themselves discord bots, discord bot list etc

#

decision to move to top.gg was probably to avoid confusion with other lists and to stop the inconsistency

#

the domain doesn't have to include bot(s) to appear on google search results

mossy vine
#

and also to expand beyond discord

earnest phoenix
#

plus dbl is a sellout so they have adsense placed all over the website, which means that it'll get ranked higher in searches related to discord bots

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

what approach would you guys to suggest for fetching an integer from a message mixed into a sentence

#

an example could be "342632 hey guys what up"

eternal mesa
#

And you just want the integer I assume?

earnest phoenix
#

yeah

eternal mesa
#

Some sort of regex

earnest phoenix
#

just found this

#

var thenum = thestring.replace( /^\D+/g, '');

amber fractal
#

Regex all characters that arent numbers

earnest phoenix
#

i guess that would turn "342632 hey guys what up" into 342632

#

however i fear cases that would be something like

eternal mesa
#

Pretty sure that removes all numbers

earnest phoenix
#

"23546 how are you guys doing 2day"

eternal mesa
#

But don’t quote me on that because my knowledge of regex is very bad

hushed berry
#

yeah, replace probalby isnt the thing you wanna do

amber fractal
#

Can you split by regex mmulu

#

Wait that'd be dumb

hushed berry
#

just split by whitespace and iterate until one parses to a number bloblul

amber fractal
#

You'd have a bunch of elements of nothing

#

Lol

quartz kindle
#

if you dont use the g flag, regex will only match the first occurence

#

so you can search for the first occurence of a number

#

regardless of its length

#

although its a bit tricky

hushed berry
#

It gets way more complicated if you want to support users adding commas or decimals

cobalt umbra
#

Yes you can get all words that are integers look it up

#

It's not healthy to know regex by hearth usually people look it up on google to refresh memory

hushed berry
#

what

amber fractal
#

Since when is knowing something not healthy

earnest phoenix
#

"it's not healthy to know the alphabet because you can google it"

loud salmon
cobalt umbra
#

Imo if you know regex by hearth you're not really sane

earnest phoenix
#

what is your logic even

#

following that, knowing anything by heart makes you not sane

#

thats. not exactly the same

cobalt umbra
#

Do you even know what kind of a mess regex is and what kind of a monster regex you can make??

mossy vine
#

and do you think they memorize it?

#

some parts, yes

cobalt umbra
#

That's my point

#

If you know that by hearth it's scary

earnest phoenix
#

if you work with regex a lot, you're bound to memorize how it works

#

i still don't get your point

cobalt umbra
quartz kindle
#

just use one of those 1k char regexes people make for urls

earnest phoenix
#

how do I fix this to appear online?

#

wait for your bot to be accepted

#

the other one was accepted

#

and it shows offline

#

was it

#

because i see no bot dev role there

#

where

amber fractal
#

here

earnest phoenix
#

what does my status have to do with my bot

#

the other one was accepted
if your bot was accepted, you would have a bot dev role

#

the other one was added when MHW came out. In february 01 2018

#

I uploaded it online

#

I rejoined this discord today again'

#

i was on this discord

#

πŸ€”

#

MHW

#

monster hunter world

#

?

#

yes

eternal mesa
#

@earnest phoenix wrong place and

#

dad faq 2

covert turtleBOT
#
Frequently Asked Questions πŸ“œ

Click the link to get more information on the question:
2) How long is approval?

earnest phoenix
#

Who ?

#

why

eternal mesa
#

@earnest phoenix you are in the development channel, a place for speaking about development

earnest phoenix
#

oh no sorry

winged rapids
#

@eternal mesa warn me for trying to pay someone to make me a bot

#

I need those links

earnest phoenix
#

lol?

winged rapids
#

Lol

#

Need those damn links

earnest phoenix
#

you could just ask

eternal mesa
#

?

earnest phoenix
#

instead of being warned

eternal mesa
#

you could have just asked like a normal person

#

dad hardrequest

covert turtleBOT
#

You seem to have asked for a very specific bot/feature. You likely won't find it on the site if you haven't searched already. You can try and put a request on Fiverr or Freelancer.

winged rapids
#

Thanks

cobalt umbra
#

what links

#

ah

tepid hedge
earnest phoenix
#

is there an easy way to filter out bot messages in the "fetchmessages" method ?

tepid hedge
grim aspen
#

you didn't imply a certain file to run

sudden geyser
#

iterate through the msg variable filtering out the ones you don't want (msg is a collection)

tepid hedge
#

creeper ill show you what happens when i specify

#

its the same error

grim aspen
#

oops

tepid hedge
#

@quartz kindle you @ d me earlier, can you help me out?

earnest phoenix
#

@sudden geyser but how would i just iterate till the first non bot msg ?

#

wouldn't want to waste resources iterating every single msg

sudden geyser
#

You can use the find method if you only need one item.

earnest phoenix
#

hmm

#

so i want the first non bot msg

#

if that makes sense

#

so msg.last() gives me the 2nd last msg

#

if i use the find method

#

wouldn't it just return the current msg ?

amber fractal
#

are you aware how find works @earnest phoenix ?

earnest phoenix
#

i think so ?

#

in this context, if i make the filter ( must be a non bot msg) it returns the first non bot msg ?

#

but that would just return the first message

#

but i want the last non bot msg excluding the very last one

amber fractal
#

so you want the last bot message that isnt the very last one?

earnest phoenix
#

the last non bot message that isn't the very last one

#

@amber fractal

amber fractal
#

filter out all the bot messages then get the middle index

#

well you'll need an array of the keys

#

(if you dont know where to start, d.js collections extend Maps)

#

better yet, you can just get an array of the entries that are left

#

no need for the key part I was talking about

earnest phoenix
#

another thing

#

when i write "var+1"

#

how do i make js treat it as an int

#

instead of as a string

amber fractal
#

parseInt()

earnest phoenix
#

that works if i store it in another var

#

i have something like

#

if(n = var+1)

#

if my var = 0, var+1 return "01"

amber fractal
earnest phoenix
#

ahh ok

#

ty

#

i used

#

parseInt(var+1)

amber fractal
#

yeah then it adds to the string first

#

then parses it

earnest phoenix
#

js and var types ay xd

quartz kindle
#

@tepid hedge whe you did npm install sqlite3
it tries to get the prebuilt binary and it doesnt find it, then it fallsback to building it. did you let it build or did you cancel it? building can take a minute or two and its normal to see walls of text

earnest phoenix
#

hmm doesn't seem to work

#

parseint won't turn a "string" into a int ?

#

for number = 10
it returns 101

#

@amber fractal

amber fractal
#

Why not just await messages if that's what you're trying to do

#

I was under the impression you just wanted to fetch messages regardless

earnest phoenix
#

the code i have right now isn't optimal either

#

there are some cases where if the 2nd last msg is from a bot that can mess the code up

amber fractal
#

I'm really not sure exactly what you want, but you can check this out if you want to get a message from a user that is a number https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=awaitMessages but I have to go

earnest phoenix
#

just want to figure out the var+1 thing out

#

for now

stray wasp
#

No @urban oriole lul

amber fractal
earnest phoenix
#

hmm

amber fractal
#

That's template literals if your wondering, may help

#

πŸ‘‹

earnest phoenix
#

cya

quartz kindle
#

@earnest phoenix additions and subtractions are sequential

#

Therefore: "a" + "b" + 1 + 1 = "ab" + 1 + 1 = "ab1" + 1 = "ab11"

#

If you want to resolve the 1+1 first, just put it in parenthesis

#

"a" + "b" + (1 + 1)

#

Parenthesis are always resolved first, just like in math, so the above resolves to "a" + "b" + 2

rancid folio
#

I use a discord bot maker thingy

#

but i have a question

#

how do i make ban commands use Discord Bot Maker on steam

#

i been only using a chat

#

thing

#

i want to soon make a prefix

#

and stuff

#

that can be used

cobalt umbra
#

I don't think bot maker thingy is going to do you any good

earnest phoenix
#

DBM is bad...

#

You can't learn with this

rancid folio
#

uh

#

its this

#

i just might but a / in all off it to act like a command

#

when really

#

its just this

earnest phoenix
#

yikes

#

isn't DBM paid...

#

it's literally free to code but i guess that's your choice

rancid folio
#

yeah

#

i paid for it

earnest phoenix
#

yikes

rancid folio
#

hey

#

its good

#

better then botghost thingy

#

im new to this stuff

#

so yeah

#

only started 3 days ago

earnest phoenix
#

lol it definitely is better than botghost

rancid folio
#

yep

#

botghost IS SO LAGGY

#

E

#

the more i added

#

the more it died

slim heart
#

smug pls calm down

#

spider already told you

rancid folio
#

oh

#

ima just talk slow

loud salmon
#

pls do

rancid folio
#

like really slow

#

so slow

loud salmon
#

and no need to newline everything

earnest phoenix
#

Just write a long text

rancid folio
#

good idea

#

im trying to think of more commands

sudden geyser
#

Make a /dab command picking one of many dabbing text phrases

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

peak bloom
#

that bot maker thing looks like so much more work

#

you still have to think about the code side of it because the "actions" are just lines of code, so it really saves you nothing and just makes you click a lot more

broken elm
#

can bots use hyperlinks

#

also clicking when programming is my pet peeve. its so tedious

shy rose
#

define "use"

#

like see a link then follow/view the page?

peak bloom
#

woah, chewey

#

long time since i seen that name

#

from the d.io server lol

shy rose
#

long time since ive ventured into dio server πŸ™ƒ

mossy vine
#

also clicking when programming is my pet peeve. its so tedious
vim was literally made for you then

green kestrel
#

@broken elm i guess you wouldnt like ue4 blueprints then...

#

πŸ˜„

#

@mossy vine vim is life. at least you didnt say emacs.

amber fractal
#

I mean you can navigate any good IDEs with the keyboard. It's just clicking is faster mmulu

mossy vine
#

not with vim

green kestrel
#

ugh, git gc.auto with a 10 gig repo can go die in a fire.

#

😦

#

its going to be christmas by the time this things done

amber fractal
#

Who has a 10 gig repo

#

Did someone upload node_modules?

earnest phoenix
#

Help

amber fractal
#

Thanks for giving us so much information to help you

green kestrel
#

i help those who help themselves! πŸ˜„

slender thistle
#

We can only help those who are willing to get help really

green kestrel
#

is it possible to connect to discord multiple times at once with the same bot token? im just mulling over easy ways to shard or cluster my bot.

#

i know i'd then need to mutex the sessions, so that every instance doesnt respond at once, that much is obvious

#

but thats trivial if i can just connect multiple instances at once and then have a first-come-first-served mutexed queue for processing commands

modern sable
#

There's a easy way for discord.js IIRC

green kestrel
#

im not using discord.js, but i might go rtfs on that one

#

i was never really a fan of node

modern sable
#

i'm pretty sure that there are easy ways for other langs/libraries aswell

green kestrel
#

the library im using is old and unsupported. im thinking of changing it

modern sable
#

which language do you use?

green kestrel
#

luckily that wouldnt take me long, the bit of my code thats dependent upon the library is only 150 lines, the rest is abstracted

#

php, with team-reflex/discordphp from composer

#

but thats just a simple interface module that interfaces with a protocol-independent backend written in perl, i won't have to touch that bit luckily πŸ™‚

#

if it discordphp doesnt support any form of sharding/clustering out of the box, that would be a final nail in its coffin for me imho, ive already found that presence updates are plain broken

modern sable
#

using discordphp is probably going to be difficult

#

especially if it's no longer being updated

green kestrel
#

there was mention of a replacement that is maintained

#

what im finding with discord is that the majority of libraries in any language imitate the structure of the underlying api

#

so the function names, objects, member variables etc are the same or extremely similar between them, makes migration easy

#

thats not been the case with other api's and libraries ive worked with over the years

quartz kindle
#

you want to shard, or to separate functions by processes?

#

discord allows up to 1000 logins per day from the same token, at 1 login per 5 seconds

#

if you cant find a library that does what you want, it shouldnt be hard to modify the login script, all you need to do is specify sharding information in the identify packet that is sent to discord

green kestrel
#

i was just thinking of doing what i would with a webapp, a mysql database cluster, redis for transient data, and multiple frontend processes connected to discord via bot credentials

#

with some sort of marshalling to make sure only one instance handles any given request

#

worth mentioning that i only have three locations where i could put instances

#

not dozens, but three and three hundred are basically the same if done properly

quartz kindle
#

if the request is coming from discord, then it will only be sent to the specific process managing that shard

#

so there shouldnt be much need for marshaling

green kestrel
#

isnt that specific process a single point of failure?

#

or does one particular instance take up that responsibility, and another take over if it goes down?

quartz kindle
#

no, each process is responsible for a given shard, containing a given amount of guilds. if the shard fails, those guilds fail, but other shards and guilds remain operational

green kestrel
#

ah ha.

#

so i cant have multiple instances responsible for the same guilds? that way a failure is transparent

quartz kindle
#

you can

green kestrel
#

sounds like theres going to be a big "but"

#

πŸ˜‰

quartz kindle
#

not really

#

you can tell discord exactly which shard to you want to login to

#

so you can have multiple processes logging it to the same shard

#

if your goal is redundancy

#

then yes, you will receive duplicated requests

#

this is actually one of my methods for developing discord bots

#

i have a copy of my token running on an nwjs instance on my home pc

#

but then if you start sharding

#

its the same as running disks in raid 0+1

#

you have 4 processes managing 2 shards

green kestrel
#

right now my only instance is on my home server, a dell T310 in the utility room... its stable enough for now but i have a dedicated server in poland and a vps in london i really should be considering expanding onto

quartz kindle
#

a single machine can handle over 100k guilds in my opinion

#

but you can also split across machines

#

the problem then is sharing data such as total guild information

green kestrel
#

yeah, i dont have a problem with performance, its just redundancy... the weak link in my chain is the domestic internet, fast enough but no real SLA

#

if it goes down, no bot

quartz kindle
#

yeah, then a vps is an easy fix for that

#

any vps network is realiable ehough that more failures will come from discord itself than from your network lol

green kestrel
#

true lol

#

my vps is kind of underused

#

i got my dedicated server for anything that really needs grunt, the vps i pay $5 for and all thats on it is an ircd

#

ive been thinking of getting rid of the dedi though, hosting bills for it are a bit rediculous

#

like Β£70 a month

quartz kindle
#

my bot is on a 3$ vps and i havent had any problems

#

currently on 1600 guilds

green kestrel
#

my bot's on ...one guild. my own πŸ™‚ i only just decided to make it public yesterday

quartz kindle
#

ahah cool

green kestrel
#

its based off an irc bot thats been running for near 20 years

#

with a database of over 1 million facts, inspired by infobot

quartz kindle
#

lmao

#

are you using the discord websocket or only running on the rest api?

green kestrel
#

websocket

quartz kindle
#

the biggest performance impact is the websocket with guild subscriptions enabled (default)

#

and even then, 1600 guilds with it enabled only use 5-7% of a 3$ vps's cpu

#

with it disabled its 1% cpu lol

green kestrel
#

to be honest im the sort of person where if i had performance issues i'd rewrite it in C++

#

not sure if theres a C++ discord api client though

quartz kindle
#

there should be

green kestrel
#

that would probably be overkill

quartz kindle
#

but im running on node.js and it already gives me a very good performance

green kestrel
#

if javascript can do it, C++ is definitely overkill

quartz kindle
#

imagine in c++ lul

#

depending on your needs, disabling guild subscriptions is a godsend

#

the only side effect is that you wont receive guild member join/leave packets

#

i really hope discord fixes it tho

green kestrel
#

what is guild subscription?

quartz kindle
#

im pretty sure its an unintended effect

green kestrel
#

i dont know too much about the api right now, only what i see as the interface to it from whatever library i use

quartz kindle
#

guild subscriptions is an option the api gives you when connecting to the websocket

#

its mainly responsible for sending TYPING and PRESENCE updates

#

but unfortunately it also affects other packets at the moment

green kestrel
#

Presence and typing events get dispatched from guilds that your bot is a member of. For many bots, these events are not useful and can be frequent and expensive to process at scale.

#

ah

quartz kindle
#

if you disable during login, you wont receive those packets at all

#

and those packets account for like 90% of the websocket traffic

#

the bombardment is absurd

green kestrel
#

i saw those already, discordphp had a bug in the presence message that was causing warnings, i was seeing them like every minute

#

so theyre being emited to me, i havent done anything to unsub from them atm

quartz kindle
#

yes they probably are

#

after i disabled it, my bot's network usage dropped like 90%

green kestrel
#

hmm, ive found the code for identification, let me read the docs and see if i can shoehorn unsubscribing from the guild events in there

#

well that isnt simple at all.

#

is it right that if i turn it on, i dont get any info on nicknames of guild members?

quartz kindle
#

Hmm

green kestrel
#

line 27is what i added in... if i uncomment it, i dont get any nicknames on people talking in the chat

quartz kindle
#

Their nicknames should be sent with guildcreate packets, i guess disabling it also strips them from there

#

But messages still contain member information

green kestrel
#

hmm

quartz kindle
#

A workaround it to get the nickname from a message pacjet

#

Thats what i did on mi e

#

Ie: nicknames are only updated when they send new messages

#

Idk how your library handles the packets themselfeves

sage bobcat
#

One message removed from a suspended account.

silk obsidian
#

hi

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

Google for installers, there are many

green kestrel
#

hmm. the author property in the message object is empty

#

i wonder how thats filled in

quartz kindle
#

It also comes with message packets

#

Unless your library is dropping them in favor of cached data

silk obsidian
#

why i can't play sony in my discord?

green kestrel
#

i think it is dopping it for cached info @quartz kindle

quartz kindle
#

Does your library expose a raw event?

green kestrel
#

not sure, i dont think it does

#

the documentation really is awful to absent

quartz kindle
#

You need to get access to the unprocessed packets

#

I had to do that in discord.js too

sage bobcat
#

One message removed from a suspended account.

green kestrel
#

im going to go see if it provides that, if not im going to hack it in

#

hah, done it. stashed the raw in a global

#

thats ugly, but meh, it works

quartz kindle
#

Yeah it feels like rewriting part of the library

#

But the gains are worth it

#

In discord.js I disabled most event processing and made my own events and my own cache updating instead

green kestrel
#

yeah its working now

#

im pulling from the global thats populated at receipt of each json message

#

i also went into the identify message and added presence data, which it wasnt doing itself, woo and yay etc

weary lark
#

anyone know any free vps services which dont require you to put a credit card in which host rethinkdb at all? lol

mossy vine
#

free vps services
i dont think such a thing exists

amber fractal
#

Not one that doesnt ask for your card

#

There are trials, but they ask for card

weary lark
#

yeah which sucks because i dont own a credit card yet (im 17)

mossy vine
#

im 15 and i got a credit card at 14 roeesip

amber fractal
#

Uh

#

Maybe a debit card

#

But you need to be 18 to get a credit card

#

unless you have a joint account

weary lark
#

lucky lol, i got helicopter/restrictive parents so yeah, anyways i tried an alternative which is exposing the rethinkdb port onto ngrok but it links it to a full domain which rethinkdbdash (a node module) (like 2828.ngrok.io) cant do, it has to have a port at the end i think from my testing so yeah (like 2828.ngrok.io:28015)

#

the reason why i want the db to be online is to do some closed beta testing with some peeps online

#

i just need something temporary for now

stray garnet
#

ideaΒ΄s how i could make an snipe command?

amber fractal
#

You'd have to save the last deleted message

stray garnet
#

o

#

and how

#

@amber fractal

amber fractal
#

I'd need more information on the lib and lang you're working in to do that

stray garnet
#

Discord.js 11.5.1

amber fractal
#

Check out the messageDeleteevent

stray garnet
#

Well, ik but how do i save the messages

amber fractal
#

In a variable

stray garnet
#

huh, example ?

amber fractal
#

It's just a variable...

mossy vine
earnest phoenix
#
const items = new Map();

for(const i of Object.keys(database)) {
  items.set(database[i].name, database[i].details);
}
    {
    "name": "thisitem",
    "details": {
      "aliases": ["thatitem"],

I've been stuck on this for awhile, basically I need to do a check for the aliases section, I know I check if the map contains the name (items.has("thisitem")) but I need to check if the map has one of the aliases, without the name of the item, so for example doing items.has("thatitem") but it obviously doesn't work, what should I be doing to check for the alias, without knowing the name first hand

#

the json bit is just a snippet of the full thing

#

I've also tried doing things like database[i].aliases or .details.aliases, without working results

#

discordjs btw

quartz kindle
#

Map has a .forEach that you can use, however that is not really ideal for your case

#

If you're using discord.js, you could use a collection instead, which give you more appropriate features such as .find()

rancid knoll
#

Hey guys, I'm really desesperate, can someone help me?I got so depressed trying to do this...

We are building a discord server to Build Viral, Techy "3Dprinted" buildings& interiors

"How to create a verification of identity and role on the server, like Suite7A server for example?

I want to have a bot , after people assign the roles, to see if they have some proof that they are really the roles they subscribed for, as in architects, engineers, etc,on my server, with a custom message for each one, do you know how to do this?if not, they would just be assigned to an extra "student" role ,apart from the role that they choose. And the ones who are verified, would appear first on the online list." DM me please if you can help me

quartz kindle
#

How would you automate such a verification process? Sounds like something that should be manually verified, for example have interested members submit an application and manually verify their knowledge and give them the role

#

Unless you devise some sort of test lol, but tests can be leaked/cheated

earnest phoenix
#

How can I host my bot 100% free without heroku or glitch?
(and self host)

#

self host

#

AWS I think has a free tier, but I know nothing about it, and if you can even host bots with it

#

If I can run node.js I can host a bot

rancid knoll
#

@quartz kindle check suite 7a (sent you an invite link) yes it would be a manually verified but the bot would ask for specific details, I don't want to msg people always with a personalized msg for each role

earnest phoenix
#

Oh, I need a credit card

#

MOM!

#

lmao

#

probably want to read about it a bit more tho

#

might only be free for a year or smthn

#

normally it's free 24/7 life

#

Unless you click on a paid service lol

quartz kindle
#

Afaik is free for 12 months

#

Google has a free forever tier, but they charge for network usage beyond 1gb/month

earnest phoenix
#

Why every website need credit card

#

DAD!

quartz kindle
#

@rancid knoll then thats not hard to do

earnest phoenix
#

apparently there is a free forever tier

#

for aws

#

There is

quartz kindle
#

You want to make it at role assignment instead of at join right?

#

You can set up a system that listens to role adding, or even some othet arbitraty starting move like reacting to a specific message

#

And then send a dm containing instructions on how to proceed

earnest phoenix
#

always searching for free linux online vm

#

is this because firstWord is treated like an int ?

#

what you've just make

sudden geyser
#

if firstWord is not a string, that's your problem

earnest phoenix
#

?

#

but anything can be a string ?

#

even if its "12345", right ?

#

πŸ€”

#

yes

#

so how do i make it treat firstWord as a string

#

i tried to wrap firstWord in a String()

#

but same error

#

firstWord = String(firstWord).replace

grizzled jackal
#

does the variable contain any string value?

earnest phoenix
#

like letters ?

#

no, not all the time

#

but that shouldn't make any difference ?

#

"23152" is still a string right ?

grizzled jackal
#

var firstWord = ''; firstWord = firstWord.replace(/\D/g, '');
yeah anything between quotation marks is a string

earnest phoenix
#

the code might be redundant for that case

#

but it shouldn't return an error right ?

grizzled jackal
#

I'm guessing it doesn't recognize it as a string

earnest phoenix
grizzled jackal
#

by assigning it a string value lol

earnest phoenix
#

uh

#

is this not a string value ?

late hill
#

No

earnest phoenix
#

ok, how do i make it treat it as a string value ?

late hill
#

It's an array

#

With one element

earnest phoenix
#

oh

late hill
#

just index it

#

with [0] yes

#

also don't know why you put () around it

#

Don't think that changes anything

earnest phoenix
#

had a method wrapped around it

#

that i deleted

trim saddle
#

this is basically how i work on playlists

        try:
            match = re.match(SURL, query)
            spotify = match.group(1)
        except AttributeError:
            sdata = None
        else:
            sdata = await self.get_spotify(spotify)

        if sdata:
            try:
               data = sdata['items']
            except:
                em.set_author(name="No playlist found. If this is your playlist make sure it isn't private.", icon_url=self.bot.img)
                em.description = ""
                return await ctx.send(embed=em)
            if not has_voted(ctx):
                em.set_author(name="Spotify", icon_url=self.bot.img)
                em.description = f"To use playlists you must [vote](https://discordbots.org/bot/{ctx.bot.user.id}/vote)."
                return await ctx.send(embed=em)
            await ctx.send("Please wait, this might take a bit depending on how long your playlist is...")
            c = 0
            for track in data:
                if not track:
                    continue
                if not track['track']['type'] == 'track':
                     continue
                
                strack = await self.bot.spclient.get_track(track["track"]["id"])
                query = f'{track["track"]["name"]} - {track["track"]["artists"][0]["name"]}'
                tracks = await self.bot.wavelink.get_tracks(f"ytsearch:{query}")
                try:
                    track = tracks[0]
                except:
                    continue
                await controller.queue.put(Track(track.id, track.info, strack=strack, ctx=ctx))
                c += 1
                await asyncio.sleep(4)
            em.set_author(name=f"Playlist enqueued. | {c} Tracks", icon_url=self.bot.img)
            await ctx.send(embed=em)
#

@slender thistle get in here >:c

trim saddle
#

some times track turns up as None

slender thistle
#

What does sdata['items'] seem to be?

trim saddle
#

the list of playlist tracks

west spoke
#

That string needs to be turned into json

#

if you are gonna use 'items'

#

otherwise you would need like 0-10

#

0,1,2,3,4,5,6,7,8

trim saddle
#

sdata is a dictionary of playlist data

slender thistle
#

Good lord

west spoke
#

Ok

#

so dict and json work similarly

trim saddle
#

they are the same thing

green kestrel
#

Lol at the mod log

#

Open eval, really? It's 2019 not 1988

trim saddle
#

this isn't the right channel for that

green kestrel
#

I don't get why so many bots even feel the need to have an eval function even for devs, there are far superior and safer ways to debug

#

That is more on topic.

astral meteor
#

How do I use a command to send a message to a different server For example, a bug report command.

green kestrel
#

Keep an array of channel objects?

shy glen
#

@green kestrel I disagree, evals can be incredibly useful to debug API returns efficiently if done correctly.

astral meteor
shy glen
green kestrel
#

@shy glen but then wouldn't you just load a debug module, then unload it after? For anything more than a simple display of a value or object you need more complicated processing than makes sense for a one liner

west spoke
#

@green kestrel evals are useful. Let's say I wanted to test my api (nbapi) its easiest to do it through eval.

green kestrel
#

Personally I'd make a separate client for that

shy glen
#

Make a whole separate client, bother coding it live, starting it up instead of having a simple command to evaluate API responses?

green kestrel
#

If you have the front and back end separated then your "separate client" should be no more than 50 lines?

west spoke
#

how about just locking it

#

easy

green kestrel
#

I guess we come from different mindsets

west spoke
#

just slap it onto your normal bot

shy glen
#

My eval command is 50 lines and I don't have to bother starting up a new client anytime I want to view a quick response.

west spoke
#

and lock it to your user

slender thistle
#

@trim saddle Mind printing track in that loop?

west spoke
#

And @shy glen I agree. Mine is around 60-70 (different types of evals, customcommand evals, etc) and having all that would be hard to convert.

green kestrel
#

The language my bot core is coded in, I have to be careful about unintended evals e.g. even a regex can contain shell commands if you don't watch out

trim saddle
#

alright

green kestrel
#

Never mind intentionally adding one

shy glen
#

Most of those lines are the actual command definition itself, to run it it's 20 lines really.

slender thistle
#

Looking at Spotify response format and your code I don't really understand how anything can be None for you lul

west spoke
#

yeah, but separating certian parts, checking for client.http.token, all that takes about 15 lines total

shy glen
slender thistle
#
while 0+1:
    for i in range(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
        text = 'A'*5000
        print(text)
        file = open(str(i), 'w')
        file.write(text)```
green kestrel
#

I assume the majority here are using node.js?

slender thistle
#

Pretty much

west spoke
#

Python

shy glen
west spoke
green kestrel
#

Hands up if your bot is written in perl βœ‹

unique nimbus
#

no

green kestrel
#

BBC BASIC anyone? 🀣

unique nimbus
#

no

earnest phoenix
#

no

green kestrel
#

Nah I was serious with the first not the second

earnest phoenix
#

i wrote my bot in lua

#

beat that noobs

green kestrel
#

Interesting

earnest phoenix
#

you cant scroll up and see that I actually wrote it in javascript shhh

green kestrel
#

Lol

shy glen
glacial anchor
#

i have a small problem

earnest phoenix
#

whats up

glacial anchor
#

i mean can i consider it small if that literally breaks the whole bot

#

so i did some changes to code and it fucked up everything

earnest phoenix
#

what library

glacial anchor
#

discord.js

#

lemme push to github real quick

earnest phoenix
#

so

#

whats the problem

mossy vine
#

that it responds with a ping to all commands i think

earnest phoenix
#

thats what I was assuming

glacial anchor
#

it responds to any message

#

literally any message

#

with just mentioning you

#

im encountering it for the first time

#

tried making the most simple task - dm support without any prefixes

#

and somehow screwed up

earnest phoenix
#

@glacial anchor remove the || !message.author.bot

glacial anchor
#

y

earnest phoenix
#

Actually

#

Change the || to an &&

#

You were using or instead of and

glacial anchor
#

i know

amber fractal
#

x or author isnt a bot

#

It will respond to all non bot messages

earnest phoenix
#

^

glacial anchor
#

fine, changed it

#

how the fuck

#

whats wrong now

earnest phoenix
#

heck

mossy vine
#

you are using message.reply

#

try logging what findGif returns

glacial anchor
#

im using message.reply

earnest phoenix
#

dont use that

glacial anchor
#

it return data.url

#

which is a url to a randomly picked gif

warm marsh
#

Could I run a command on different threads?

glacial anchor
#

changed message.reply with message.channel.send

#

guess what

quartz kindle
#

@warm marsh yes

warm marsh
#

It's worth doing?

quartz kindle
#

Depends

amber fractal
#

Do you actually know what you're doing MegaThonk

warm marsh
#

I'm currently working on music.

quartz kindle
#

If its an expensive command, yes

warm marsh
#

So I thought maybe threads would make it run slightly better.

quartz kindle
#

Is it sync code?

warm marsh
#

Em, No clue.

quartz kindle
#

Have you timed it?

warm marsh
#

timed it doing what?

amber fractal
#

Execution time

warm marsh
#

I've not timed it but it's a good second or 2

glacial anchor
#

its glitch rewind time

earnest phoenix
#

πŸ‘€

glacial anchor
#

no im gonna lose a lot of code

#

damn

#

i really need help

quartz kindle
#

@warm marsh if its 2 seconds of sync code, yes

#

If its just 2 seconds of waiting, then no

#

Like waiting for a promise, http request, external command

#

2 seconds of sync code would make your entire bot unresponsive util the command is completr

warm marsh
#

It's like 2 seconds of running. I call the command it does all the things, E.g. validate link or search for a video with the provided args then joins channel then plays music.

earnest phoenix
#

Hey

#

I have it so my bot picks a random color from a list of colors, but it sticks with that color until the bot is restarted.

#

Is there a way to make it so it picks a different color every single time the command is used?

sudden geyser
#

randomAnswer is saved up there. You could set the variable within the exec method instead

earnest phoenix
#

oh shoot

#

lol thanks

earnest phoenix
#

had one more question

#

how would I make it so the bot would come back with a users name through dms

#

in dms

#

Im wondering if DBL can support deploys.io yes i know about the drama and if i were to preview it. I can see everything but in my actual DBL website, it shows nothing...

Any ideas why?

#

Website

#

@earnest phoenix You find the user requested and just do message.channel.send(username variable)

#

its like in guilds

warm marsh
#

<Message>.author

#

is what you're looking for.

gusty island
#

Recommendation for action? The 'Luca' bot sent me the notification "Reason: Your bot has a command (logware help) that sends a message to every online member in the server. This is considered to be API abuse. please fix this before you re-submit." But after we reviewed the code we could not find any reference to code that sends messages to all users in the bot we submitted. How do we find out more about this report OR do I just resubmit and risk getting flagged as a spammer?

hushed berry
#

DM the mod that declined it @gusty island

gusty island
#

K. looking it up.

#

@tulip wave Can we DM on this to gain clarity?

tulip wave
#

Sure DM me

fallow geyser
#

Hm.

require('dotenv').config()
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});

client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});

client.login(process.env.SECRET);

elfin vale
#

that is in index.js, yes?

fallow geyser
#

Yes.

#

RIP

#

is that why??

#

@elfin vale ??

earnest phoenix
#

do node .

#

Did you forget to save in VS Code? In the screenshot you put in general you had unsaved changes @fallow geyser

fallow geyser
#

Hm.

earnest phoenix
fallow geyser
#

Ahh.

#

Thanks my bro.

#

or ma'am.

#

idk.

earnest phoenix
#

No problem πŸ‘

earnest phoenix
#

hi

elfin vale
#

is that why??
no, it shouldn't be.

#

but it seems you have it fixed so nvm

minor raft
#

Hello!

earnest phoenix
#

hi

minor raft
#

Can someone teach me how to make a moderation bot?

#

I really want to make on

#

one*

sick cloud
#

learn how to make a bot then just make commands

#

moderation is a broad topic

minor raft
#

Like.

#

Dyno.

#

I used this site to make my bot.

#

But I wan't it to be public.

sick cloud
#

you can't make a bot with dbl?

minor raft
#

dbl?

sick cloud
#

what do you mean by this site

minor raft
#

May I put a link to it?

sick cloud
#

i guess

#

then you haven't made a bot

#

you just used a free dumb website

#

dbl (top.gg) doesn't accept botghost bots

minor raft
#

I want to lear.

#

learn*

earnest phoenix
#

can you even export the code on something like botghost

sick cloud
#

no you can't

earnest phoenix
#

lmao

sick cloud
#

@minor raft do you know any programming languages

#

@earnest phoenix at least you can with dbm, ngl i have it and it's half decent, quite rich

#

still shit though

minor raft
#

I know a little.

sick cloud
#

what language

minor raft
#

Java.

sick cloud
#

honestly, try google

#

you might find a good guide

minor raft
#

What do you use?

sick cloud
#

make sure it's recent (2018 onwards, 2019 is better)

#

node.js personally

minor raft
#

Oh.

#

I have node.js downloaded.

#

Too.

sick cloud
#

but do you know it

minor raft
#

nope.

#

0%

#

Which is better tho?

sick cloud
#

no language is 'better' than the other

#

you're best to go with what you know better

minor raft
#

True.

#

Ok.

#

May you teach me node.js tho?

#

Or is it to much?

earnest phoenix
#

nodejs isnt hard to learn

#

just look up some guides, docs, etc

sick cloud
#

you can learn if you want

minor raft
#

Yeah.

#

I hear a lot of people use node.js

sick cloud
#

because it's easy for beginners usually

minor raft
#

Oh!

#

That is good then!

#

I am just starting to get into coding.

#

I was good at it before.

#

But then i stopped.

#

Do you use 12.11.1?

#

For node.js?

broken shale
#

people say py is easier

minor raft
#

Really?

earnest phoenix
#

wut

sudden geyser
#

Yes, but Node.js is bae for me. AstolfoHeart

slender thistle
#

Preferences

fallow geyser
#

Lol.

#

My coding:

require('dotenv').config()
const Discord = require('discord.js');
const client = new Discord.Client();
var parseArgs = require('minimist')

client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});

client.on('message', msg => {
console.log(msg.content)

var msgarr = msg.content.split(" ")
var command = parseArgs(msgarr)._
var opts = parseArgs(msgarr)
delete opts._

switch(command[0]){
    case "help": {
        var help = () => {
            msg.reply("Commands: help, mute, unmute and deleteme")
        }

        if("delay" in opts){
            setTimeout(help, opts.delay)
        } else {
            help()
        }
        break;
    }
    case "deleteme" :
        msg.delete()
        break;
    case "mute" :
        var target = msg.mentions.members.first()

        target.addRole("631642552508088320")
        msg.reply("Added mute role to: " + target.displayName)
        break
    case "unmute" :
        var target = msg.mentions.members.first()

        target.removeRole("631642552508088320")
        msg.reply("Removed muted role for: " + target.displayName)

}
});

client.login(process.env.SECRET);

grizzled jackal
#

And you're showing it because?

sick cloud
#

have you ever heard of codeblocks

earnest phoenix
#

or a command handler

sudden geyser
#

oh god

minor raft
#

My screen just went all black for like 10 mins

#

After updating windows.

#

😢

tulip tundra
#

linuxx>>>>>windows

#

my opinion

minor raft
#

WHy?

valid frigate
#

typical linux > windows tbh

#

it's preference

tulip tundra
#

idk i just fell better with linux

valid frigate
#

what are you trying to say

#

and yeah windows updates tend to make the screen go black for a bit depending on which device

tulip tundra
#

windows is insecure

valid frigate
#

ok?

#

nobody asked LUL

tulip tundra
#

what are you trying to say

valid frigate
#

nothing

#

anyway can anyone link a good resource to setting up redis? i can't find any good guide mmulu

#

me dum dum

manic basalt
#

discord.py

File "/Users/doh/Desktop/wumpus/plugins/images.py", line 177
   return await ctx.send(ctx.bot.tick(False, username=ctx.author.name, "I'm sorry, you can not poke me."))
                                                                                   ^
SyntaxError: positional argument follows keyword argument

could someone explain this error and a solution for it

slender thistle
#

You can't do func(kwarg=something, another_arg)

#

Positional arguments must be put before the keyword ones

manic basalt
#

ohh I see, thank you

#

I forgot the label=

slender thistle
glacial anchor
#

anyone know some node.js vps that actually works 7/24

#

free, paid, whatever it is

humble pendant
#

galaxygate?

sick cloud
#

does python have a sort of typeof or something

glacial anchor
#

yep

sick cloud
#

what is it?

glacial anchor
#

i dont have enough money for it @yesno#8099

#

@sick cloud typeof

humble pendant
#

idk then

mossy vine
#

@sick cloud it does, but it behaves really fucking weird. stackoverflow should help tho

green kestrel
#

does the discord api have any built in rate limiting, throttling or flood control?

#

or will it just let your bot spam with imunity until someone kicks it?

#

if the answer is "yes", they have some intelligent queing and i cant get banned for someone elses abuse, that saves me a lot of effort. otherwise im going to have to port some perl code.

weak parrot
#

Discord does have buildin rate limiting yes

#

Granted it is recommended to try and not hit API/library ratelimits in the first place.

green kestrel
#

ah, so there are still limits i should avoid, ok

#

on the irc side of my bot, there is a socket maximum throughput which i have set at a couple of kb/sec, would something like that suffice on the discord side, or does it have to be smarter?

weak parrot
#

Well one thing I'd recommend avoiding is setting a bots playing status faster then 12 seconds since that's the official limit but many (if not all) libraries allow you to set status which change faster then 12 seconds.

Besides that idk many bots just make custom cooldowns with different cooldown periods depending on the command. Granted not all bots have custom cooldowns/ratelimits as its technically not required.

green kestrel
#

(which is why i asked, rather than google, api docs in general are known for being outdated usually)

weak parrot
#

Pretty sure it is yeah

green kestrel
#

ok, that ones sorted as right now i only set the presence once as part of the identify

weak parrot
#

But each library pretty much has their own ratelimits

green kestrel
#

the library im using is very primitive. it wasn't you i was talking with yesterday was it about guild_subscriptions?

weak parrot
#

No it wasn't. I personally don't talk all that often in development since most people ask for help with languages I have never used

green kestrel
#

ah, ok πŸ™‚

#

if im asking here im generally asking more generic questions, i dont expect anyone else to know perl or be using php

#

seems the majority here are using node.js and python

#

seems the actual rate limits arent published there

#

just a discussion of the headers where theyre contained

#

im guessing the discord dev team just adjust them as and when depending on whats hurting performance of their server farm

#

or maybe even automatically adjusted based on cpu usage and traffic, shrug

weak parrot
#

Yeah

small prairie
#

i need last message sent in a channel discord.js

#

no one..

languid dragon
#

you didn't really give any details....

green kestrel
#

what's the markdown formatting for those funky looking block quotes that bots seem to send for help, with a coloured bar down the left hand side

#

im not sure what theyre called

#

are they 'embeds'?

languid dragon
#

yes

earnest phoenix
#

Still have a prefix problem : 1 character is fine, 2 crashes the bot
Why? (using discord.js)

languid dragon
#

..ev message.channel.send({embed:{ description: 'hello', color: 0x825c19}}) -s

covert turtleBOT
#

hello

#
ReferenceError: s is not defined
    at eval (eval at client.on (/root/dbl-coffee-bot/index.coffee:219:15), <anonymous>:1:73)
    at Client.client.on (/root/dbl-coffee-bot/index.coffee:219:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)
languid dragon
#

im really dumb

drowsy sentinel
#

I can second that.

languid dragon
#

you wanna get beaned?

drowsy sentinel
#

yasssssss πŸ’‹ 😘 πŸ‘¬

stable wagon
#

hello

small prairie
#

You have bot coffee UwU??

#

can i run Two diffrent codes with SAME token

#

@languid dragon

sick cloud
#

why do you want to

small prairie
#

@sick cloud No real reason tho just wanted to check it out

#

I mean

#

two diffrent set of commands running in two diffrent scripts

#

not overlapping each other

sick cloud
#

why though

small prairie
#

idk

#

WHy asking so much questions

#

If i can okay nvm then

earnest phoenix
#

your ratelimit handling is going to be messed up

#

it's not suggested to run two instances of your bot at the same time

#

they aren't aware of eachother's ratelimits, which can make your bot token hit the actual discord ratelimit often and get you API banned

#

wouldnt the bots token restart?

#

no

#

the bot token gets reset by discord if you spam the gateway

#

aka log in and log out about a thousand times in a day

small prairie
#

@earnest phoenix temp banned for 10mins i remember

earnest phoenix
#

the api ban is one hour

small prairie
#

Oh

green kestrel
#

is there serious money to be made with 'premium' versions of discord bots, or is it generally "beer money" amounts?

#

anyone got a concrete answer on that

earnest phoenix
#

i mean, there's only money it if it's a music bot

#

""premium bots"" are hosted on a different higher performance server

#

which means less usage, faster

green kestrel
#

but they would cost a ton to host, due to bandwidth, and could lose subscribers whenever youtube change their api in a hostile way

earnest phoenix
#

music bots like rythm easily make up for it with patreon

#

low guild count bots which offer a ""premium version"" are often hosted on the same server as is the regular bot

#

because their owners are stupid and want clout

green kestrel
#

ah πŸ™‚

#

i was considering offering a premium of my own bot, but the premium would be exactly that, a standalone instance

#

the idea of the bot is that it globally learns from discord, so a shared instance may have other peoples facts and learnings in it, a standalone would be just your data

#

i was thinking containerise each one, and make a container and a vps activation part of the subscription/activation system

#

but, right now i dont know if its worth it or if anyone will even want my bot, so its just pie in the sky

earnest phoenix
#

it's better to not rush into it

#

i say give it time to make your bot known

green kestrel
#

i already have all the platforms etc, as im using them to make small amounts of money from other things... web and shell hosting, game development etc

#

so it would just be time taken to code the integrations and add a payment gateway

#

but if nobody will want it, it would be wasted time and effort

#

speaking of which has anyone ever seen a trivia bot on discord?

earnest phoenix
#

there are many

#

don't know any off the top of my tongue but it's been done a lot

green kestrel
#

nice πŸ™‚ i spent months making a really good one on irc years ago, probably wont bother to port it

open flicker
#

why bots use shard?

green kestrel
#

to split processing load across multiple instances when a bot is on thousands or more guilds

earnest phoenix
#

sharding is enforced at 2.5k guilds

#

by discord themselves

green kestrel
#

really? well, i learn something new every day

open flicker
#

thanks understood

#

how to do when there is no AFK channel it says "AFK channel not found" and not "Null"? help pliz

earnest phoenix
#

do a null check

#

with either an if or a ternary operation

midnight lantern
#
const map = message.guild.members.filter(mb => mb.roles.has(rol.id)),
rol = message.guild.roles.find(r => r.name === "HOLA");
if (!rol) return console.log("No existe este rol");

map.forEach(e => e.removeRole(rol)).catch(console.error);

I have this error

C:\Users\sergi\Desktop\BOT_Alejandreta>node .
C:\Users\sergi\Desktop\BOT_Alejandreta\index.js:3972
                map.forEach(e => e.removeRole(rol)).catch(console.error);
                ^

SyntaxError: Identifier 'map' has already been declared

Any suggestion ?

earnest phoenix
#

use let

#

you don't need it to be a const

midnight lantern
#

is it the solution?

inland ridge
#

i think so

#

when that doesn't work will the map var already declared by the node.js

earnest phoenix
#

let, var and const have different scoping rules

midnight lantern
#

i did all changes:

let mapSSS = message.guild.members.filter(mb => mb.roles.has(rol.id)),
rol = message.guild.roles.find(r => r.name === "HOLA");
if (!rol) return console.log("No existe este rol");

mapSSS.forEach(e => e.removeRole(rol)).catch(console.error);

and it doesnt work:

C:\Users\sergi\Desktop\BOT_Alejandreta>node .
C:\Users\sergi\Desktop\BOT_Alejandreta\index.js:3972
                mapSSS.forEach(e => e.removeRole(rol)).catch(console.error);
                ^

SyntaxError: Identifier 'map' has already been declared
earnest phoenix
#

you've placed a comma instead of ; at the end of the first line too

midnight lantern
#

ou mama, its true XD

midnight lantern
#

now, I have this error:

(node:14944) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'catch' of undefined
    at Client.client.on (C:\Users\sergi\Desktop\BOT_Alejandreta\index.js:3971:40)
    at process._tickCallback (internal/process/next_tick.js:68:7)
earnest phoenix
#

because forEach is not a promise

green kestrel
#

is there something obvious missing from this presence update? because when i send it to discord, it boots me with invalid opcode

#

ive tried idle_since => null, too

#

seems to be this

earnest phoenix
#

discordphp is abandoned

green kestrel
#

indeed

#

im going to fix it πŸ™‚

earnest phoenix
#

presence has changed many times since then

green kestrel
#

it looks like im missing idle, since, and afk

earnest phoenix
#

iirc rich presence wasn't even a thing back then

green kestrel
#

as i got it working on identify, and the packet structure is different there

#

yup that did it

green kestrel
#

needs afk, status, and since

earnest phoenix
#

it's there

green kestrel
#

i just need to change that to 'Watching' now, brb, reading docs

trail raptor
#

Has anyone setup the voting webhook with a laravel app?

green kestrel
#

two minutes minimum is fine for presence updates yes?

amber fractal
#

@green kestrel thats fine

green kestrel
#

cool, thanks Steven πŸ™‚

earnest phoenix
#

Speedy

amber fractal
#

Oh

#

Wowie

#

Can't type fast on phone

green kestrel
#

hmm

#

so its against the terms of use to self-bot, e.g. connecting a bot via the api the client uses, but is it against the terms of use to do the opposite, and connect a chat client to the bot api?

#

e.g. if someone wanted to use that to get around the 100 server limit for users for example

slender thistle
#

I believe that's not allowed either

grim aspen
#

that's against the terms

green kestrel
#

thought it might be πŸ™‚

earnest phoenix
#

@vital lark
How to set
the members
of the servers
in activity

#

^pls

vital lark
#

I don't think you can do that

earnest phoenix
#

hmm

#

Shiro do that

vital lark
#

it's all users in

#

the shard the guild is in

earnest phoenix
#

Oh

#

can i have ?

#

the command for all

vital lark
#

Β―_(ツ)_/Β―

earnest phoenix
#

members

vital lark
#

there is no command?

grim aspen
#

no spoonfeeding

vital lark
earnest phoenix
#

2minutes

grim aspen
earnest phoenix
#

i want to change

#

for

#

members

vital lark
#

it's client.users.size

earnest phoenix
#

oh

#

ty

#

πŸ™‚

vital lark
#

no problem

green kestrel
#

hmm, did you know that technically, discord can request an audit of your code, which is vaguely mentioned in the terms of use for the API?

earnest phoenix
#

Can you correct me @vital lark pls client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' + client.guilds.size + " serveurs", | ' + client.users.size + " users", '{ type: 'WATCHING' })

green kestrel
#

it only mentions remote monitoring of usage and crawling as examples, but vague enough that if youre a big fish they could request visibility of your source code.

#

note: "could", "maybe", "only", "vaguely"

#

so keep your code neat ant tidy people, you never know when discord may want to see it πŸ˜›

earnest phoenix
#

Ok?

#

It's a rich presence

#

for my first bot :c

#

This feels like a non issue

#

i just need help

green kestrel
#

@earnest phoenix it is, but the loophole is there if you really caused them a hassle

#

where i work we've used a similar loophole to go visit supplier sites

earnest phoenix
#

bots can't have rich presence

#

Activity *

#

I have fix the error but my bot don't see members 😦

#

client.user.setActivity('🌌 Galaxy Bot V1.0 | galaxy.help | ' + client.guilds.size + " serveurs" | + client.users.size + " users", { type: 'WATCHING' })

green kestrel
#

that above isnt a rich presence, its a presence update

earnest phoenix
#

@green kestrel Why my activity doesn't work ?

slender thistle
#

Have you restarted the bot

green kestrel
#

you mean its not updating it? please be specific

earnest phoenix
#

I have restart @slender thistle

slim heart
#

Where are you setting the activity

sage bobcat
#

One message removed from a suspended account.

slim heart
#

What is prefix