#development

1 messages · Page 319 of 1

empty moat
#

Do any other bots here have the prefix q?

#

hope not because thats my bots prefix

weary shoal
sinful jolt
#

!help

empty moat
#

only mine

earnest phoenix
#

How do you check if a user is on the Discord Bans site?

sinful jolt
#

Use there api

earnest phoenix
#

Wheres their api?

jagged plume
#

somewhere on the website maybe

earnest phoenix
#

How do you do external emojis?

supple shale
#

Ha look at those discord.js phesants using if statements for commands Lul

#

@earnest phoenix i recommend instead of checking a user every time, just get the entire list then check from that

#

is muuuuch quicker

sinful jolt
#

indeed

supple shale
#

just dont provide a userID to get the entire list

quasi badge
#

anyone having sudden problems with rule34.xxx http requests not responding?

#

the api gives a response in browser, but a local hosted and heroku hosted bot both don't receive responses suddenly. worked fine for months straight.

earnest phoenix
#

PSA: cd ~ && rm -rf will delete EVERYTHING

inner jewel
weary shoal
#

Anybody know why my SQLite isnt storing IDs properly? I have them set to store as a string but for example the id 326080439662149633 becomes 326080439662149600

fiery goblet
#

wait one sec

#

@fiery goblet

#

oh nub

weary shoal
#

Hmm

#

It's stored properly in the table as well

sinful jolt
#

in py you have to store it as a str

weary shoal
#

It's just getting it back

sinful jolt
#

Idk js

fiery goblet
#

dm the code pls mercy

#

i do sqlite

weary shoal
#

sql.all('SELECT * FROM donators ORDER BY donation DESC LIMIT 5');

#

@fiery goblet

earnest phoenix
#

Hmm

weary shoal
#

One ID returns another

surreal peak
#

rip

sinful jolt
#

It's rounding for some reason

#

@weary shoal can you have it return a string

#

Instead of a number

fiery goblet
#

good idea

weary shoal
#

I dont know how to do that lmao

fiery goblet
#

''

sinful jolt
#

I went through that with the with python

#

dpy 1.x uses integers for ids

fiery goblet
#

quotations marks is a string, none is int

sinful jolt
#

Rethink would round all IDs just like that

weary shoal
tawny lava
#

lol

sinful jolt
#

Ayyyy

earnest phoenix
#

can someone help me make a cleverbot? now i don't want an API, but making my own, i use discord.js and sqlite for database

sinful jolt
#

🤷‍♀️

earnest phoenix
#

ok thanks, i'll check it out

narrow falcon
#

Can someone help me out with a mute command in python

sinful jolt
#
overwrites = channel.overwrites_for(user)
overwrites.send_messages = False
await self.bot.edit_channel_permissions(channel, user, overwrites)```
narrow falcon
#

?

sinful jolt
#

:/

narrow falcon
#

:/

neat flower
#

:/

tawny lava
#

:/

weary shoal
#

:/

umbral pelican
#

:/

vital lark
#

:/

fiery goblet
#

:/

crimson flume
#

;/

earnest phoenix
#

:/

supple shale
#

:/

vital lark
#

Javascript

#

Javascript - Easy to teach / learn
Java - Good for a Music Bot
Scala - I do not know

exotic bison
#

does anyone have any python codes (commands)

vital lark
#

no

umbral pelican
#

Gitflub will BlobOwO

fiery goblet
#

how to make await messages, discord.js :/ 101

vital lark
#

ok

#

@fiery goblet Need help with?

#

It is for me :3

#

it's very easy to teach

fiery goblet
#

await message like commando

vital lark
#

o

fiery goblet
#

but i dont want to use commando

vital lark
#
  return
  await msg.channel.send```
#

You need async to do await

fiery goblet
#

ugh

#

ik that

vital lark
#

you can do

#

what

fiery goblet
#

like nano, where no args a prompt come up

umbral pelican
#

LULUL not that sort of await

vital lark
fiery goblet
#

hmmm

vital lark
#

it might say

#

"Use send"

fiery goblet
#

that is well different

harsh zenith
#

Can I get a dummy patreon pledger to test the api?

vital lark
#

Sure

harsh zenith
#

Nice

#

just pledged 1,19€ to mysqlf

fiery goblet
#

sure

exotic bison
#

Can someone text my bot ?

#

Test*

fiery goblet
#

u

exotic bison
#

?

umbral pelican
#

test it yourself :|

neat flower
#

lel

fiery goblet
#

im using sqlite and discord.js, it inserts your guild into the database if it isn't already and everytime i restart it, it always says inserting your guild into the database, help?

earnest phoenix
#

Are you sure it's saving after it inserts into the db? I would start the bot then close it, and open the db file with a SQLite db explorer, and if the guilds aren't there, then it's not saving. @fiery goblet

fiery goblet
#

it's cool now

exotic bison
#
async def shutdown(ctx):
'''Turns Bot Offline (Dev. Command Only)'''
    author = '231553410095120384'
    if author == ctx.message.author.id:
        for server in client.servers:
            await client.send_message(server, "Bot Is Temporarily Down For Maintnence")
        await client.logout()
        exit()```
#

what is wrong with this code ?

weary shoal
#

I don't know py, but don't you need a channel to send a message to? That's just sending the message to the server.

exotic bison
#

yea i want it to send the message to all servers

weary shoal
#

Then don't you need the default channel of each server?

exotic bison
#

no. it saying something wrong with the indent

karmic parcel
#

there's no promise that they have the default channel anymore tho

exotic bison
#

can you approve my bot ?

fiery goblet
#

nunu

exotic bison
#

plz

keen anvil
#

not if you ask

karmic parcel
earnest phoenix
#

how does the approvement process work?

exotic bison
#

its been like 5 hours

keen anvil
#

you wait, and when a mod has time we make sure it's not stolen and works

fiery goblet
#

patience

weary shoal
#

@exotic bison Wait, doesnt discord.py store ids as ints now?

earnest phoenix
#

how do you verify it's not stolen? look at the code?

fiery goblet
#

commands

earnest phoenix
#

ok

keen anvil
#

@earnest phoenix so @fiery goblet isn't a mod, don't listen to him. We check how the commands work, respond, how the menus look, if there's source code, we check that too.

earnest phoenix
#

ok, do i need to give access to my source code? from the way you phrased it it sounds optional

keen anvil
#

you don't need to, but it would be helpful.

#

There's a github link section on the form

earnest phoenix
#

uh huh

fiery goblet
#

so yea, commands

sinful jolt
#
@client.command(pass_context = True, Hidden = True)
async def shutdown(ctx):
'''Turns Bot Offline (Dev. Command Only)'''
    author = '231553410095120384'
    if author == ctx.message.author.id:
        for server in client.servers:
            await client.send_message(server.default_channel, "Bot Is Temporarily Down For Maintnence")
        await client.logout()
        exit()``` @ikTray#1057
#

left

fiery goblet
#

welp, not able to install sqlite cuz of node-gyp

sinful jolt
#

ERR! Please try running this command again as root/Administrator. blobwaitwhat

#

Do you read the Stacktraces ?

tawny lava
vital lark
#

wew

fiery goblet
#

nop

karmic parcel
#

lol

earnest phoenix
#

@fiery goblet sudo is your friend blobtonguewink

fiery goblet
#

yeee

earnest phoenix
#

Reeeeee

fiery goblet
#

gud gud databases (apart from sqlite and reThonkdb)

earnest phoenix
#

t

earnest phoenix
#

Someone teach me how to use SQLite kthxs

bitter sundial
#

don't

earnest phoenix
#

Nothing wrong with SQLite Tonkku

#

It's easy Jacz

#

Just google how to use SQL

slow spoke
#

wow

sinful jolt
#

It's only good if you use it the right way you can't make a ton of reads simultaneously on SQLite it's concurrency is basically non-existent

earnest phoenix
#
                                 ^

TypeError: Cannot read property 'has' of undefined``` need help
neat flower
#

either thisor this.fighting is not defined

#

as it says in the tin

earnest phoenix
#

Thx =)

neat falcon
#

de!stats

restive silo
#

@earnest phoenix pls never use sendMessage anymore its deprecated

karmic parcel
#

Spams sendMessage

earnest phoenix
#

xD

bitter sundial
#

it's not deprecated if you never update

tawny lava
earnest phoenix
#

Need help with my bot can help me

tawny lava
#

what's the issue

#

and what lang / library

earnest phoenix
#

I created a bot and I want to put the welcome code in it and I do not know what it is
I want the bot to tell who enters and who leaves my group

tawny lava
#

what library

#

tbh stuff like this should be easily found with a simple google search

earnest phoenix
#

Javascript

tawny lava
#

discord.js?

earnest phoenix
#

yes

tawny lava
#

use the guildMemberAdd and guildMemberRemove events

earnest phoenix
tawny lava
earnest phoenix
#

??/

#

?

tawny lava
#

events

#

where do events go

#

in that project

earnest phoenix
#

ok

#

@tawny lava

tawny lava
#

that literally makes no sense to me

#

english

#

k ty

sinful jolt
#

Show main bot file

earnest phoenix
#

That is just the terminal, we need code

sinful jolt
#

Index.js it looks like

earnest phoenix
#

¯_(ツ)_/¯

#

his entire bot is fucked up

#

the filesystem

umbral pelican
#

it's a lost cause :3

tawny lava
#

^

sinful jolt
#

Why is the ready event a text file ¿

#

Did you even make this?

earnest phoenix
sinful jolt
#

That would work but you have a event handler so use it :/

earnest phoenix
#

As I do not know what to do, help me

sinful jolt
#

Copy your ready event

#

Where did you even get the bot? You made a event handler but don't know how to use it WaitWhat

earnest phoenix
#

I made this bot and I do not know how to use it

#

I want you to pass the bot, you install and poe

sinful jolt
#

Your events go in events

earnest phoenix
#

no

sinful jolt
#

Yes?

tawny lava
#

yes

#

that folder is there for a reason

earnest phoenix
#

yes

tawny lava
#

what's in the folder?

sinful jolt
earnest phoenix
#

yes

sinful jolt
#

Just by this conversation I'm guessing you found a super simple bot on github or some gist and started adding things not quite knowing what your doing just my guess read that link it will help I believe

fiery goblet
#

ye i did

karmic parcel
#

rip

#

I wanna start making modules

#

I've been making my own in my bots

tawny lava
#

do eet

neat flower
#

I made this bot and I do not know how to use it

#

boi

karmic parcel
#

rip

neat flower
#

amnesia is a bitch

karmic parcel
#

I made this bot and I know how to use it

earnest phoenix
#

I made a full bot and it's working, but I don't know how to use it

#

xD

tawny lava
#

xD

worldly nymph
#

Where do I find my authentication key?

fiery goblet
#

2fa?

worldly nymph
tawny lava
fiery goblet
#

on the site, look for urself owo

sinful jolt
#

I'll sell you one for 30$

earnest phoenix
#

Do you know anyone from here who speaks Portuguese? @tawny lava

tawny lava
#

nope

neat flower
#

@earnest phoenix me

#

But even speaking your native language won't help if you dont understand the programming language itself

earnest phoenix
#

That is a support server

#

Its better to ask for support there

fluid fable
#

?

earnest phoenix
#
GamerCodes#0257 said:

?

#

Look at the photo. I share a mutual server with him called 'An Idiot's Guide Official Server', it's a support server for people who use discord.js

#

I was saying since he's on it, he should ask questions regarding discord.js there

fluid fable
#

he banned me

#

York

earnest phoenix
#

Why?

fluid fable
#

our reasons

earnest phoenix
#

Looks like the Komada Support wasn't happy with you

#

lol

fluid fable
#

lol u ask?

earnest phoenix
#

no I looked up your conversations lol

fluid fable
#

lol

empty moat
#

Hai guys someone able to help me rewrite my music fully? I deleted it and forgot how to make it again, and the discord.js examples crash my bot / aren't good enough / don't have the required commands / won't work at all ;-;

earnest phoenix
#

because d.js is bad

#

@empty moat

empty moat
#

...

#

most people ik use it

#

and that is pure opinion based @earnest phoenix

earnest phoenix
#

use eris

#

@earnest phoenix you shouldnt be going around calling libs shit tho just bc someone uses it

empty moat
#

you think ill learn eris AND recode my bot that has more thank 4 weeks worth of work in it? just for that? lol. i just need help with mai music

#

what @earnest phoenix said ^

earnest phoenix
#

eris is similar to d.js

#

Bc abal copied

#

nah

#

seriously get other it

#

or eris

empty moat
#

eww python

earnest phoenix
#

@earnest phoenix ...

jagged plume
#

make sure you have all the required stuff like ffmpeg and opusscript node-opus

earnest phoenix
#

python is great

#

Make sure to have UWS

#

give me 20 reasons why python is bad

#

and I'll give up

empty moat
#

@jagged plume I already have that and node-opus doesn't work

earnest phoenix
#

20 valid reasons

jagged plume
#

get opusscript then

empty moat
#

i have

jagged plume
#

then you arent doing it right

empty moat
#

but i mean idk how to actually code music commnads like

#

play and stop*

earnest phoenix
#

so

empty moat
#

i dont actually have music

earnest phoenix
#

n

#

no

#

we aren't going to code a bot for you

empty moat
#

Did you see me say "code me a bot"?

#

No

earnest phoenix
#

code you music

empty moat
#

Stop it.. seriously.. I asked for help and you came along and pooped all over it

keen anvil
#
is Lucy; - Today at 2:45 AM
Hai guys someone able to help me rewrite my music fully?

is Lucy; - Today at 2:52 AM
i dont actually have music
earnest phoenix
#

^

empty moat
#

How does that help @keen anvil 👀

#

I literally asked for help to rewrite my music

#

not create an actual bot

keen anvil
#

the music you don't have written at all

empty moat
#

I did have music

#

read what i said

#

i did have it but i deleted it

keen anvil
#

I did read, I actually just quoted you lol

empty moat
keen anvil
#

also

#

is Lucy; - Today at 2:50 AM you think ill learn eris AND recode my bot that has more thank 4 weeks worth of work in it? just for that? lol. i just need help with mai music

#

this is a bad excuse not to change libs lmao

empty moat
#

🤷 Simple answer is that I don't want to

keen anvil
#

I just rewrote my multiple month development bot with ~20k servers into Eris, and it was easy and helped a ton with performance

earnest phoenix
#

I'm looking for developers to help me make a bot called Discord Games Dm me.

empty moat
#

@earnest phoenix whats this discord games thing gonna beeh?

earnest phoenix
#

Playing game in discord aka RPS Blackjack cards

empty moat
#

also i cant dm you because my dms are disabled and i dont add random people just to dm them .-.

#

ok

earnest phoenix
#

umm

#

idk why u cant

empty moat
#

🤦

earnest phoenix
#

oh lel

empty moat
#

:3

spare spruce
#

hey anyone done .net discord bots before?

earnest phoenix
#

ofc

neat flower
#

Nadeko is .NET if i recall

sinful jolt
#

It is

surreal peak
#

k

next shore
#

can someone help me with visual studios, im trying to code my bot

#

anyone???

earnest phoenix
#

What about it?

#

@EliteScorpion324#1974

#

nvm

surreal peak
#

k

karmic parcel
#

Rip

surreal peak
#

love people who need their answer within 5 seconds or they leave

karmic parcel
#

same

#

I want to marry them

silver ore
#

Umm

#

I need help!

tawny lava
#

!!!!!

#

what's the matter

silver ore
#

So Im programming my musicbot so he can react to messages like Hello. If someone says !say Hello he must reply with Hello.

#

I dont know how to write this in Python

umbral pelican
#

🦏

bitter sundial
#

a cleverbot?

tawny lava
#

Idk any python

silver ore
#

Yes

#

Thats what I got at the moment

#

Tonkku can you help? You know python?

bitter sundial
#

nope

earnest phoenix
#

What library are you using?

silver ore
#

What do you mean with library?

sinful jolt
#

What version of dpy?

#

Because no one uses disco

#

0.16 or 1.0

silver ore
#

The version of python?

sinful jolt
#

The version of dpy

tawny lava
silver ore
#

ah wait a moment

sinful jolt
#

Also that looks like a rhino command Handler

silver ore
#

0.12.0

sinful jolt
#

the code is vary outdated and will no longer function soon

#

Rhino has to use 12 as after that the music bot class no longer exists

#

I can't help you sorry

silver ore
#

So I just wanted to know how the bot can react to strings after cmd_say

#

!say <string>

sinful jolt
#

It uses it own strange ass Command handler so I really don't know

#

For a dpy com ext py @commands.command(pass_context=true) async def say(ctx,*,msg): await bot.say(msg)

#

How ever your wasting your time as come October that bot will no longer function

silver ore
#

Wait

#

why?

sinful jolt
#

the current stable Discord py version is 0.16

#

12 usees apiv5 I think

silver ore
#

Can I update it without losing the whole bot?

sinful jolt
#

not really as it uses a class that doesn't exist anymore

#

It needs rewitten from the ground up

silver ore
#

...

sinful jolt
silver ore
#

So I need to create a new bot

#

?

umbral pelican
#

you need to create your own bot ULTRALUL

silver ore
#

umm

keen anvil
#

UMMMM

tawny lava
#

umm

earnest phoenix
#

umm

main vigil
#

umm

earnest phoenix
#

umm

earnest phoenix
#

@harsh tusk Don't self advertise

#

it's against the rules

harsh tusk
#

ok srry

#

didnt know

tawny lava
#

delete it then

drowsy wedge
#

Anybody know how to make a bot jojn a voice channel on python?

tawny lava
#

not me

earnest phoenix
#

scroll up

drowsy wedge
#

i can't type xD

tawny lava
#

@harsh tusk no

earnest phoenix
#

Crystal posted it

drowsy wedge
#

k

harsh tusk
#

hey can someone help me with my discord server?
pls

harsh tusk
#

-help

tawny lava
#

wot

slate patrol
#

any one know how to make an uptime thing, so if you were to send it, it would be 0D, 0H, 1M, 29S (Similar or exactly the same) in discord.js

tawny lava
#

you use moment

vital lark
#

Moment = Bae

earnest phoenix
#

moment is shit

#

use humanize-duration

#

it's lightweight

tawny lava
#

moment is nice wdym

umbral pelican
#

moment very nice

slate patrol
#

how do I get the time tho?

#

do I use node.js or discord.js? and how?

tawny lava
#

ehh

#

moment.duration(client.uptime).format(' D [days], H [hrs], m [mins], s [secs]'); this is how I do it

#

set it to a variable or something

earnest phoenix
#

hd(bot.uptime)

#

ez af

tawny lava
#

hmm

#

let's see

weary shoal
#

s*eval require('moment').duration(client.uptime).format(' D [days], H [hrs], m [mins], s [secs]');

#

Oops

slate patrol
#

@earnest phoenix I get a decimal for the seconds, how can I remove that?

tawny lava
#

hd(bot.uptime, {round: true}); @slate patrol

earnest phoenix
#

^

umbral pelican
#

^

tawny lava
#

^

earnest phoenix
#

^

harsh tusk
#

hey can someone help me with my discord server?

#

-help

umbral pelican
#

no :|
ask again and you're gettin' a bean shoved up ya

earnest phoenix
#

he sent me a friend request

#

lol he thinks I have friends

harsh tusk
#

ok srry

earnest phoenix
#

lol

earnest phoenix
#

same @earnest phoenix

earnest phoenix
#

@earnest phoenix u should add cooldown to @rose laurel

#

I know

#

I heard you

#

ree

#

setInterval

#

for

#

dayz

earnest phoenix
#
     | DiscordAPIError: Missing Permissions
3|bait     |     at item.request.gen.end (/root/BaitBot/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:68:65)
3|bait     |     at then (/root/BaitBot/node_modules/snekfetch/src/index.js:244:21)
3|bait     |     at <anonymous>
3|bait     |     at process._tickDomainCallback (internal/process/next_tick.js:228:7)
3|bait     | { DiscordAPIError: Missing Permissions
3|bait     |     at item.request.gen.end (/root/BaitBot/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:68:65)
3|bait     |     at then (/root/BaitBot/node_modules/snekfetch/src/index.js:244:21)
3|bait     |     at <anonymous>
3|bait     |     at process._tickDomainCallback (internal/process/next_tick.js:228:7)
3|bait     |   name: 'DiscordAPIError',
3|bait     |   message: 'Missing Permissions',
3|bait     |   code: 50013,
3|bait     |   stackframes:
3|bait     |    [ { file_name: '/root/BaitBot/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js',
3|bait     |        line_number: 68 },
3|bait     |      { file_name: '/root/BaitBot/node_modules/snekfetch/src/index.js',
3|bait     |        line_number: 244 },
3|bait     |      { file_name: null, line_number: null },
3|bait     |      { file_name: 'internal/process/next_tick.js', line_number: 228 } ] } Promise {
3|bait     |   <rejected> { DiscordAPIError: Missing Permissions
3|bait     |     at item.request.gen.end (/root/BaitBot/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:68:65)
3|bait     |     at then (/root/BaitBot/node_modules/snekfetch/src/index.js:244:21)
3|bait     |     at <anonymous>
3|bait     |     at process._tickDomainCallback (internal/process/next_tick.js:228:7)
3|bait     |   name: 'DiscordAPIError',
3|bait     |   message: 'Missing Permissions',
3|bait     |   code: 50013,
3|bait     |   stackframes: [ [Object], [Object], [Object], [Object] ] } }
#

Anyone know what this means

#

tho it has perms

#

^

tawny lava
#

what is it trying to do exactly

earnest phoenix
#

Join a voice channel and play music

tawny lava
#

hmm

#

that's weird

earnest phoenix
#

it was working

#

as well

#

might go test on another guild

#

nope

#

Restarting vps 🤔

neat flower
earnest phoenix
#

Anyone here used Restify
and Added a rest header to it
so only people with "x" can use it

opaque bison
#

wat is dis

#

:/

surreal peak
#

Google: ENOMEM = not enough memory

#

@opaque bison

#

Check for a memory leak or sumthing

opaque bison
#

Ohh sheeet

#

Okay

#

Well I mean like, I have 512MB VPS and it's a Music Bot so... yah

#

That could be the issue

surreal peak
#

yea

opaque bison
#

damn...

slate patrol
#

My server count doesnt seem to be working

earnest phoenix
#

@slate patrol Library and whats not working

#

and if Discord.js can i see code without ur token drakelel

slate patrol
#

sure

#
      client.shard.fetchClientValues('guilds.size').then(result => {
        const guildsizes = result.reduce((prev, val) => prev + val, 0)
        snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`)
        .set('Authorization', dbotstoken)
        .send({"server_count": guildsizes})
        .then(() => console.log(`dbotsstats updated successfully`))
        .catch(err => console.error(err))
earnest phoenix
#

what about it

#

wait wtf

#

wtf

#

??

#

why are you puting server_count in a string

#

Because he can

#

its a object

#

some people do it like that

#

It doesn't matter

#

it works

#

not for me

slate patrol
earnest phoenix
#

:p

#

also

#

is it me or ur not closing result

#

you have an unclosed bracket

#

^

slate patrol
#

Oh I have that I Just forgot to copy that

earnest phoenix
#

actually, it's better to include quotes around the object properties than to not to

#

it provides better support

#

@slate patrol Do u have the right* token and can u console.log result

slate patrol
earnest phoenix
#

then u arent getting anything from result

#

give me a sec

#

do this.

#

this.guilds.size

#

then console log result again

#

owo and console.log guildsizes

slate patrol
#

So ``` client.shard.fetchClientValues('this.guilds.size').then(result => {
const guildsizes = result.reduce((prev, val) => prev + val, 0)
snekfetch.post(https://discordbots.org/api/bots/${client.user.id}/stats)
.set('Authorization', dbotstoken)
.send({"server_count": guildsizes})
.then(() => console.log(dbotsstats updated successfully))
.catch(err => console.error(err))
});

earnest phoenix
#

no

#

guilds.size

#

inside fetchClientValues

umbral pelican
#

have you sharded? HYPERTHONK

earnest phoenix
#

^

#

@slate patrol Have u sharded?

slate patrol
#

erm, im not sure what that is....

earnest phoenix
#

...

#

🤦

tawny lava
#

then no

earnest phoenix
#

theres ur issue

tawny lava
#

lol

umbral pelican
#
const snekfetch = require('snekfetch')

snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`)
  .set('Authorization', 'UR DBOTS.ORG KEY')
  .send({ server_count: client.guilds.size })
  .then(console.log('Updated dbots.org status.'))
  .catch(e => console.warn('dbots.org down spam @oliy'));

use this one

earnest phoenix
#

You can't use that script then...

#
const snekfetch = require('snekfetch')

snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`)
  .set('Authorization', 'UR DBOTS.ORG KEY')
  .send({ server_count: client.guilds.size })
  .then(console.log('Updated dbots.org status.'))
  .catch(e => console.warn('dbots.org down spam @oliy'));```
#

reee

#

Jacz

#

pls

#

just stop

#

wot?

#

you got a problem Mayo

#

nvm

#

I have a problem?

#

how so

tawny lava
#

mayo has alot of problems

earnest phoenix
#

a lot*

tawny lava
#

alot

earnest phoenix
#

Alot*

#

a lot

#

Alot*

umbral pelican
earnest phoenix
#

it's grammatically correct to say a lot

tawny lava
#

alot

#

@umbral pelican go away

earnest phoenix
#

it's a lot

umbral pelican
#

lol xd

earnest phoenix
#

it's alot

slate patrol
#

thanks for your help, it works now

earnest phoenix
gleaming mica
#

Okay, I just invited my custom bot to a discord and it wont authorize

tawny lava
#

wdym won't authorize

vital lark
#

Are you on the account? Is it private?

gleaming mica
#

It's private

#

Do I have to make it not private?

tawny lava
#

if it is private you have to invite it from the account that it was created in

#

if that makes sense

gleaming mica
#

It's still not working

#

It says this application cannot read or send messages on your behalf.

earnest phoenix
#
const datadog = async (client) => {
    let memUsage = process.memoryUsage();
    metrics.gauge('guilds.size', client.guilds.size);
    metrics.gauge('memory.rss', memUsage.rss);
    metrics.gauge('memory.heapTotal', memUsage.heapTotal);
    metrics.gauge('memory.heapUsed', memUsage.heapUsed);
    metrics.gauge("memoryUsage.total", (process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2));
    metrics.gauge("client.ping", client.uptime);
    metrics.gauge("client.voiceConnections", client.voiceConnections.size);
};``` For datadog-metrics module tho guild count isnt posting but uptime is also that time when u relise u put client.ping for client.update
#

Wait dw

#

im an idiot

gleaming mica
#

Ok, I tried to put the custom bot link in my server but the link says its an unknown error. I don't know what i'm doing wrong.

vital lark
#
   dispatcher.on('end', () => {
             ^

TypeError: Cannot read property 'on' of undefined``` Why am I getting this error 🤔
earnest phoenix
#

Show code

#

dispatcher is undefined

vital lark
#

let dispatcher;

earnest phoenix
#

no

#

just

#

no

#

just no

vital lark
#

then what?

earnest phoenix
#

const dispatcher = connection.playFile('C:/Users/Discord/Desktop/myfile.mp3');

#

is an example dispatcher

vital lark
#

oWo

earnest phoenix
#

What did you expect to happen when running a method on an empty var? Thonkang

slate patrol
#

Is ytdl-core is a good youtube download library?

earnest phoenix
#

Yes

#

@slate patrol The best Kappa

vital lark
#

yes

#

:Kappa:

earnest phoenix
#

Anyone got any thing that is CPU heavy (bot or service) i can host to use my vps?
DM me if u want free VPS hosting with seprate user (No sudo perms)

slate patrol
#

Im doing if (args[1].includes("youtube.com")) but then it always says please enter a valid youtube link

earnest phoenix
#

show code

#

Talk is cheap

quasi reef
#

I think you have to add /watch?v=

slate patrol
#

oh nvm, I didnt double check my code, I put youtube.ccom instead of youtube.com

quasi reef
#

gg

earnest phoenix
#

@quasi reef u dont

#

...

vital lark
#

lol

quasi reef
#

@earnest phoenix wowowo calm down boyo

#

@earnest phoenix A N G R Y B O Y O

earnest phoenix
#

What, are you high?

quasi reef
#

Yes.

earnest phoenix
#

Banne

slate patrol
#

Also 1 more question

#

My args is var args = message.content.substring(prefix.length).split(" ");, how can I make them all combined except for args[0] (since thats the command)

earnest phoenix
#

ehh no

#

pls

#

two secs

#

i got very good args

#

const args = message.content.slice(prefix.length).trim().split(/ +/g);

#

use let or const

tawny lava
#

@slate patrol with that you can do args.slice(1).join(" ");

#

if you don't want to change the args

earnest phoenix
#

hmm true

tawny lava
#

also ye

#

change var to let or const

harsh tusk
#

!play patty cake kodak black

earnest phoenix
harsh tusk
#

what

#

?

#

bot devoloper what thatmean?

#

u heled make them?

tawny lava
#

what?

#

bot dev = made a bot

quasi reef
#

.

opaque bison
#

I wanna play a stream 😭

earnest phoenix
#

@opaque bison not hard

#

simple-youtube-api and ytdl-core

opaque bison
#

Noo I mean, stream from a m3u and those kinda formats

#

not YouTube Live Stream

earnest phoenix
#

ow

crude tapir
#

does anyone here know how to change the playing status with discord.py library

abstract mango
#
await bot.change_presence(game=discord.Game(name='Your game'))
crude tapir
#

thanks

abstract mango
#

np

#

btw are you on rewrite?

crude tapir
#

idk

abstract mango
#

check the version

opaque bison
#

I have File A.js which has

exports.tell = function(){
return true
}

but when I require A.js in XYZ.js, and I log

<A>.tell();

it returns Undefined

#

Why the f

#

tell me

abstract mango
opaque bison
#

😐

crude tapir
#

anyway thanks @abstract mango i tried everything and finally you gave me the solution

abstract mango
#

np

opaque bison
#

now help me too pls ❤

abstract mango
#

idk js

#

aa a a a a A

opaque bison
#

kk

crude tapir
#

he i kinda know some js but im crap at it

abstract mango
#

same tbh

crude tapir
#

i only know some cos arduino

abstract mango
#

my js skills aren't the best at all

crude tapir
#

so i also have a question, how do you make a ping command in discord.py?

keen anvil
#

there are plenty of open source py bots with great examples

#
  • google
crude tapir
#

helpful...

harsh tusk
#

whats th luca bot what it do>?

#

-play yung pinch song

tawny lava
#

luca bot doesn't play music

#

it shows info about usres / bots

harsh tusk
#

oh ok

#

nerd bot?

#

and can some of these bots can they talk to u?

tawny lava
#

Idk

opaque bison
#

pls halp me 😭

harsh tusk
#

oh

tawny lava
#

@opaque bison with?

opaque bison
#

Scroll up pls

harsh tusk
#

lol who wanna dont me on paypal? lolololol

#

donate

tawny lava
#

no

harsh tusk
#

xxxDDDDD

opaque bison
#

Bruh, I have a bot with almost 500 guilds, 70+ commands, I get no donations so yeah

tawny lava
#

@opaque bison not really sure

opaque bison
#

Ikr

#

I have been trying since hours

#

I am pissed

harsh tusk
#

lll he lp me with my server?

#

any1

tawny lava
#

no

opaque bison
#

If you have anything related to bot's development ask here otherwise move to #general

tawny lava
#

don't think it's just bots

#

anything development I believe

opaque bison
#

I mean any kind of development

#

yeah

#

anything which includes programming

#

Bumping my own question... Sorry it's way too up for someone to read....

I have File A.js which has

exports.tell = function(){
return true
}

but when I require A.js in XYZ.js, and I log

<A>.tell();

it returns Undefined

earnest phoenix
#

wait

#

use module.exports

opaque bison
#

but

#

okay

earnest phoenix
#

theres no different iirc

#

tho brb bout to get into bed

abstract mango
opaque bison
#

that does nothing

keen anvil
#

there is zero difference by doing that

#

it's him being picky and bossy

opaque bison
#

I tried it

#

I mean it changed nothing

keen anvil
#

there is zero difference by doing that

earnest phoenix
#

theres no different iirc

#

I know that

opaque bison
#

I'ma try debugging

keen anvil
#

probably should have been your first move

opaque bison
#

Well idk how to debug 😐

#

node-debug won't work cuz my node-gyp has issues

#

I couldn't install that module correctly

abstract mango
#

have you run it over with a lint?

keen anvil
#

use an edit with a built in debugger

abstract mango
#

:p

keen anvil
#

pls don't use a seperate lib for debugging when you don't need to

opaque bison
#

oki

#

Which built in debugger though? I have never ever debugged my app before

#

or maybe I have and I don't know that's debugging

#

I am an idiot

keen anvil
#

vscode has a built in debugger

opaque bison
#

oh yeh

#

how can I forget

#

wtf

sinful jolt
#

Webstorm as well

sinful jolt
#

why would snekfetch r.body return <buffer ea di c3 ect>

earnest phoenix
#

Snekfetch is weird that way, you can still use it as if it was normal text though. @sinful jolt

#

If you want to see the body, use body.body.toString()

sinful jolt
#

ahhh Ty~

earnest phoenix
#

I meant r.body

#

np

vital lark
#

Yes... r.body

#

shit

earnest phoenix
#

pls

#

why

vital lark
#

idk

keen anvil
#
Could not find MIME for Buffer <https://cdn.discordapp.com/avatars/220095699390300160/0a504a6fbfc2c73a35c3112a5ace948c.jpg?size=128> (HTTP: 502)
#

anyone know what that means?

#
Multipurpose Internet Mail Extensions (MIME) is an Internet standard that extends the format of email to support: Text in character sets other than ASCII. Non-text attachments: audio, video, images, application programs etc.
``` like whut
#

well I went to the link

#

but this is only for random people's avatars

#

not everyone's

sinful jolt
#

I get that right after they change there avatar

#

Usually Discord has deleted that avatar hash

keen anvil
#

yup, after talking to Jake, it was just a disabled event issue lmao

#

f me

#

didn't know avatars were included in presence update

sinful jolt
#

o no shit

#

I didn't ether

harsh zenith
#

Does anyone know if I can have a bot adding an other bot to the server?

umbral pelican
bitter sundial
#

no, unless your bot is a userbot and can solve captchas

weary shoal
#

@sinful jolt r.text also works for snekfetch instead of doing .toString()

earnest phoenix
#

^ true

sinful jolt
#

Noted Ty~

opaque bison
#

I am calling a function from another file but when I call that file and it's function, it returns undefined....

#

NodeJS bt

karmic parcel
#

code?

opaque bison
#

I copied that same function to the main file and it still won't return shit

#

which is this

#

1 sec

#
exports.isVoter = function(id){
        request.get(`https://discordbots.org/api/bots/303181184718995457/votes`)
                 .set('Authorization', 'Get Your Own Token... Not mine')
                 .then(r => {
           console.log(r.body.map(c=>c.id).includes(id))
            return r.body.map(c=>c.id).includes(id);
        }).catch(e => {
            console.error(e)
        console.log(`DiscordBots.org is down, Please Contact @oliy##0330 (Olive Garden)`);
        });
}
#

it's using request module

sacred knoll
#

Why do you do r.body.map(c=>c.id).includes(id) twice?

karmic parcel
#

do you use arrow functions often?

opaque bison
#

I am just logging the result @sacred knoll

karmic parcel
#

How do you call it then?

opaque bison
#

in console for debugging

#

the function's log returns true or false but when I call it, it returns undefined

sacred knoll
#

@opaque bison What's wrong with using a variable instead of doing the thing twice?

opaque bison
#

...

karmic parcel
#

I would honestly just return the promise, then handle the resolve in your other file?

opaque bison
#

You understand that's not an issue right?

sacred knoll
#

I know I just think it's weird.

karmic parcel
#

unless you are using async/await shiiit

opaque bison
#

a promise

#

hmm

#

maybe but still

#

I wanna know what's wrong with this

karmic parcel
#

Yeah, just return the request.blah blah without the .then

#

and then handle the request in the other file

#

I think it has something to do with not knowing how to process the return when it actually resolves

#

since it would look for the function asynchronously, but wouldn't get a value until it actually resolves

opaque bison
#

I am doing the same thing in other functions too but it doesn't work :/

karmic parcel
#

so it works in the others?

opaque bison
#

yeah

#

I think I might have got it, idk

#

The request.get isn't returning to the function, it's only returning to request.thenpart of the code

#

and not isVoter

#

That's my thinking

#

What I can do for that is make a variable and then get that variable value

#

or suggest me something

karmic parcel
#

is it just returning the promise?

opaque bison
#

It's just returning true or false

karmic parcel
#

I'd try to just return the promise, and then handle it in the other file to see if that's it

#

I thought you just said it was undefined?

#

reeee

opaque bison
#

no

#

I mean it's returning true or false inside of request.then()

#

okay so that global variable thing worked 😉

karmic parcel
#

global

#

variable

#

yuck

tawny lava
#

hmm

opaque bison
#

lmao that's the best I could think of

tawny lava
#

if it works then it's not yuk gg

umbral pelican
#

global variable, kill it quick 🔥

opaque bison
#

lol

sinful jolt
#

Why not bind it to client

tawny lava
#

what's so bad about global variables?

neat flower
#

Memjunk

karmic parcel
tawny lava
#

hmm

sinful jolt
#

client.isVoter = () => ect

karmic parcel
#

that's what he is doing tho

#

but just not arrow function

sinful jolt
#

o lol

neat flower
#

Js anonym argumentless functions look so weird

opaque bison
#

Hmm

#

Anything better than global variable?

#

I personally don't wanna use it xD

karmic parcel
#

resolve the promise where you handle the data?

opaque bison
#
var blabla = undefined;
exports.isVoter = function(id){
        request.get(`https://discordbots.org/api/bots/303181184718995457/votes`)
                 .set('Authorization', 'nope')
                 .then(r => {
           // console.log(r.body.map(c=>c.id).includes(id));
            blabla = r.body.map(c=>c.id).includes(id);
        }).catch(e => {
            console.error(e)
        console.log(`DiscordBots.org is down, Please Contact @oliy##0330`);
        });
    return blabla;
}
#

I have that lmao

#

Ik that's super bad

sinful jolt
#

i do this

karmic parcel
#

reeeeee

sinful jolt
#
bot.upVotes = async () =>{await bot.snekfetch.get(`https://discordbots.org/api/bots/334186716770598912/votes?onlyids=1`)
        .set('Authorization', bot.config.dblkey)
        .then(rsp =>
            bot.votes = JSON.parse(rsp.text).length )};
bot.votes = "";```
opaque bison
#

owo

#

I am getting if a person is avoter

#

a voter*

sinful jolt
#

check the list

opaque bison
#

yeah

sinful jolt
#

oo

#

lol wrong func

#

i have the same one

karmic parcel
#

I'm not on Node 8 eyers

opaque bison
#

wow

sinful jolt
#

that returms the list

karmic parcel
#

I use LTS

opaque bison
#

Ohh good idea

sinful jolt
#

its just

opaque bison
#

I'll do that honestly

sinful jolt
#

bot.votesL = JSON.parse(rsp.text) )};
bot.votesL= "";

opaque bison
#

hmm

sinful jolt
#

r.body

karmic parcel
#

snippets in VSC are making me honry

sinful jolt
#

I think I have it as

karmic parcel
#

OwO

neat flower
#

lood

sinful jolt
#

o.O

earnest phoenix
#

@opaque bison That wont work

#

It will return undefined before the snekfetch has retrieved the data

#

it only "works" if you call it twice, and even then it doesn't have updated data

spare spruce
#

yo how can i make reaction by pulling out Emoji form another server so fi thy say MGN pulls out reaction

#

ik way but ik how pull all of them

earnest phoenix
#

confused

spare spruce
#
mgn/eval message.channel.send(bot.client.guilds.get('76042782438858752').emojis.map(c=>c.toString()).join(' | '))```
#

i need way make that reaction

#

as 1 emoji

opaque bison
#

ikr it won't work

#

what do I do?

#

😭

earnest phoenix
#

@spare spruce You want to get a single emoji from a server?

spare spruce
#

yes when thy say MGN in chat will put as reaction

#

emoji coming from other server thow

earnest phoenix
#

Then just put msg.react("\:mmLol:")

#

ugh

opaque bison
#

@earnest phoenix

earnest phoenix
#

msg.react(":mmLol:")

#

wtf discord

opaque bison
#

oops

earnest phoenix
#

lol

spare spruce
#

how i make so thy say this

#

MGN

opaque bison
#
it only "works" if you call it twice, and even then it doesn't have updated data

So what can I do in this shitty situation?

spare spruce
#

and emoji pops up

earnest phoenix
#

:mmLol:

#

discord

karmic parcel
#

return the promise and handle it there

#

like I've been saying

#

reeee

earnest phoenix
#

Use promises

#

or callbacks

opaque bison
#

Yes okay

earnest phoenix
#

promises are better

opaque bison
#

I'll do it then

earnest phoenix
#

there is the docs for discord.js

#

use them

#

if you're using d.js

spare spruce
#

but i dint know how make so thy say MGN in chat pull out react

sinful jolt
#

I call them both on boot once @opaque bison

spare spruce
#

dont*

earnest phoenix
#

then use the docs

#

of your lib

spare spruce
#

and plus pull out other discord

earnest phoenix
#

or ask in the official support server

spare spruce
#

ik someone done it before

#

thy had bot doing it

earnest phoenix
#

This isn't the best place to ask, you should really use the official support server for your lib

#

or the docs of your lib

sinful jolt
#

Also I catch the list and only call the func if the user id isn't in the catch list as to not blast the API here on every Command @opaque bison

opaque bison
#

oh true

spare spruce
#

hey im getting collection is not defined on discordjs and i dont see patten how defind it

opaque bison
#

Show code pls @spare spruce

spare spruce
#
if(msg.content.toLowerCase().includes("mgn")) {
        collection.find('MGN', ':MGNEnglish:')
        msg.react(":MGNEnglish:")
    }```
#

i trying pull out EMoji form MGN discord as React when thy say mgn

#

@opaque bison

#

i been told use that methered and doesnt work

jagged plume
#

what is collection

opaque bison
#

What is collection doe?

spare spruce
#

\o/

opaque bison
#

Do this, msg.guild.emojis.find, I'm not sure if it's right but read the docs

spare spruce
#

was on discord js docs

opaque bison
#

It was a type

#

Not a defined array

spare spruce
#

i try pull out emoji

opaque bison
#

Yeh

spare spruce
#

ik way do all of them but try pull out as reaction 1 emoji

jagged plume
#

wa

opaque bison
#

Oh you wanna see reaction of a message?

spare spruce
#

so fo thy do mgn

opaque bison
#

I'm so confused on what you want

spare spruce
#

pulls out emoji form other server

opaque bison
#

You want your bot to get an emoji off a server and send it to a different server?

#

Like React with it?

spare spruce
#

see preview i did

#

thats all them try pull out 1

#

as react

opaque bison
#

I'm lost...

#

Please brief

spare spruce
#

right see all them emojis top

tawny lava
#

don't get what you're trying to do

#

yes

opaque bison
#

Ikr

spare spruce
#

i used this code do that javascript message.channel.send(bot.client.guilds.get('76042782438858752').emojis.map(c=>c.toString()).join(' | '))

tawny lava
#

yes

#

I can see that

spare spruce
#

i want try pull out mgn logo as react

#

so thy say mgn

opaque bison
#

In any guild?

spare spruce
#

react pops up from that discord

#

yes in mine and few others

#

and MGN 1

opaque bison
#

You can just create a reaction using the code

#

Like

#

Create a custom emoji

#

And then react with it normally

spare spruce
#

trying pull out here

#

76042782438858752

#

in thy discord sed me make it

opaque bison
#

I don't think you can pull out Emoji's from one server and react on others

spare spruce
#

yes can

#

i gve command

opaque bison
#

Owo

spare spruce
#

i try convert that as 1 emoji

opaque bison
#

So confused rn

spare spruce
#
message.channel.send(bot.client.guilds.get('76042782438858752').emojis.map(c=>c.toString()).join(' | '))```
jagged plume
#

use .find

spare spruce
#

see

#

thats people say use find

#

not working not defined

jagged plume
#

trying so hard not to spoonfeed

#

pls

#

you cant use "collection.find" because you havent told it what collection is.

spare spruce
#

use that as const fuction

jagged plume
#

thats what the error is saying

spare spruce
#

thats what getting

jagged plume
#

const function what

#

oh lord

spare spruce
#

ReferenceError: collection is not defined

#

see

jagged plume
#

you cant use "collection.find" because you havent told it what collection is.

spare spruce
#

thats what i used

#

collection.find('MGN', ':MGNEnglish:')

jagged plume
#

oml

spare spruce
#

look at

#

[12:26]

#

i send code becoz Aditya want know code

#

i told when i started

jagged plume
#

you cant use "collection.find" because you havent told it what collection is.

spare spruce
#

what else use then

jagged plume
#

collection is undefined

spare spruce
#

how pull out

jagged plume
#

bot.emojis is a collection

#

Use that instead of the word "collection"

spare spruce
#

XDD rip

#

DiscordAPIError: Unknown Emoji

jagged plume
#

instead of MGN you are supposed to put name

#

And get rid of the : in the emojis name

#

pls read the docs aa

spare spruce
#

i did read docs