#development

1 messages · Page 370 of 1

frail kestrel
#

ok

austere meadow
#

@tame rivet should just be discordbots.org/search?q={query}

tame rivet
#

ye i mean the api endpoint

#

/api/bots?search

austere meadow
#

is there a search API?

#

i cant remember

tame rivet
austere meadow
#

ohh

tame rivet
#

everything i try to pass returns an empty array

austere meadow
#

yeah api/bots?search={query} works but im not sure how you'd add the modifiers

tame rivet
#

okay its colon separated

austere meadow
#

ah okay

tame rivet
#

danke

austere meadow
neat falcon
#

how do i make my bot icon animated Thonk (for use on my site not on dbl cause bot page change™)

austere meadow
#

what do you mean? do you wanna make the icon animated on discord or just on the site?

neat falcon
#

just on a site

#

like i think welcomer used to have it

#

where the icon moved up and down

#

before bot page change

austere meadow
#

oh

#

you can do it with css 3 transitions

.test {
  animation: moveupdown 6s linear infinite;
  position: absolute;
  left: 0;
  bottom: 0;
}

@keyframes moveupdown {
  0% {
    bottom: 0;
  }
  50% {
    bottom: 100px;
  }
  100% {
    bottom: 0;
  }
}
neat falcon
#

thanks

earnest phoenix
#

free code

#

L:

neat falcon
#

though

#

why does it keep going to the bottom

#

and not center

#

thonk

austere meadow
#

?

neat falcon
#

even with html <center> it goes to bottom left

austere meadow
#

maybe try with position: relative;?

neat falcon
#

now it works, thanks

is there anyway to change how far it moves?

austere meadow
#

yeah you can adjust the movement in the % amounts
so at 50% you can change bottom to whatever you want

#

you can also change the time under animation

neat falcon
#

ok

thanks it looks good now kek

austere meadow
neat falcon
austere meadow
#

same

neat falcon
#

also same

earnest phoenix
#

@prime geyser u need to remove the line
bot.login(ur token);

#

and u ask. . . how will my bot login then
change the code to
bot.login(process.env.BOT_TOKEN);

#

go to Settings you should find it on the top of the website(where u can check logs and stuff)
click it go to where it says Reveal Config Vars

#

add a var with
Key = BOT_TOKEN
VALUE= ur token without the ""
now ur discord bot token is safe

prime geyser
#

Ok

#

Thanks

#

Send me in PMS the invite link of your bot plz @earnest phoenix

earnest phoenix
#

ok

prime geyser
#

I m on the settings

#

But I don't see Reveal Config Vars

#

@earnest phoenix

earnest phoenix
#

hmmm

#

not ur user settings the discord bot settings

prime geyser
#

On ngithub '? @earnest phoenix

earnest phoenix
#

heruko

prime geyser
#

Ok

earnest phoenix
#

it should look like dat

prime geyser
#

Yes Ihave found

earnest phoenix
#

if u did it properly it should work

prime geyser
earnest phoenix
#

u need to change ur github repo a bit

#

bot.login("fjisdhfiodahfhdsoihfosdihfosdhfaos");
to
bot.login(process.env.BOT_TOKEN);

prime geyser
#

So pmed me I also need help @earnest phoenix

earnest phoenix
#

help with?

#

ye dat should work

earnest phoenix
#

recode my whole website?

#

🤔

#

just remove does lines of code

#

the thing is

#

I use freenom

#

so :^)

#

and i code my own

#

i think u can stil remove it thou

#

idk

#

are u using .tk?

#

yeah you're allowed to remove it

#

used freenom before

earnest phoenix
#

In js How to ignore this server on level up message?

low rivet
#
if (message.server.id = this){
  return
}
```?
#

pseudo code pls don't copy directly

earnest phoenix
#

K thanks @low rivet

scenic crest
#

@earnest phoenix make level up messages opt-in (per server)

#

Then you don't need to ignore any server

earnest phoenix
#

K thank you

sacred spade
#

I need some help. When I try to send info to the site I get this Error: 401 Unauthorized
I'm using node.js and this is the code.

const fetch = require('snekfetch')
fetch.post('https://discordbots.org/api/bots/295310183305969665/stats')
  .set('Authorization', 'process.env.BOTLIST_TOKEN')
  .send({   "server_count": client.guilds.size })
.then(console.log('loaded and logged'))
gusty topaz
#

you are literally sending the string process.env.BOTLIST_TOKEN
instead of your token

#

remove quotes around process.env.BOTLIST_TOKEN

sacred spade
#

whoops

earnest phoenix
#

const member = message.mentions.members.first() || message.guild.members.get(args[0]) || message.member;

#

doesn't work anymore???

quiet bobcat
#

Could somebody help me? I have this to download music for my bot js server.dispatcher = connection.play(YTDL(video.url, { filter: "audioonly" })); I needed to update my ytdl becuase it wasn't working and now it's extremely laggy. I used to have js server.dispatcher = connection.playStream(YTDL(video.url, { filter: "audioonly" }));

#

but that doesn't work anymore

earnest phoenix
#

ya same

wispy axle
#

Do you change ur bot pfp in discord api or do u log in on the bot account?

uncut slate
#

you need to change your bot accounts profile picture from the bot itself, yes

wispy axle
#

k

earnest phoenix
#

Can anyone help me with discord.js quickly?

modern kelp
#

k

#

what do you need

tender sluice
#

!Hosting

old glade
#

How do you get the number of server the bot is installed on with discord.py ? I can't get something working

steel sleet
#

len(bot.servers) i think

old glade
#

yup

#

did the work

#

Thank you 😃

steel sleet
#

np

earnest phoenix
#

Hi

pulsar cairn
#

hi

earnest phoenix
#

Uhm

#

Guys how to fix this How to fix this
File "main.py", line 6, in <module> import chalk ModuleNotFoundError: No module named 'chalk' $

#

I?

pulsar cairn
#

hmm idk

#

maybe try pychalk

earnest phoenix
#

pychalk @pulsar cairn

#

?

pulsar cairn
#

pip install pychalk

earnest phoenix
#

@pulsar cairn Downloading pychalk-2.0.0.tar.gz Collecting six==1.11.0 (from pychalk) Downloading six-1.11.0-py2.py3-none-any.whl Installing collected packages: six, pychalk Running setup.py install for pychalk ... done Successfully installed pychalk-2.0.0 six-1.11.0 $

pulsar cairn
#

that means it worked

earnest phoenix
#

Now lemme run again

pulsar cairn
earnest phoenix
#

@pulsar cairn thanks ❤

pulsar cairn
#

np

earnest phoenix
#

It's working

pulsar cairn
#

kk

earnest phoenix
#

Anyone help me with some discord.js

old glade
#

How do I set the number of servers my bot is installed on on discordbots.org ?

fathom pebble
old glade
#

oh thank you

earnest phoenix
#

Anyone help me with discord.js quickly?

quiet bobcat
#

?

fathom pebble
#

what be the problemm?

earnest phoenix
#

How do i make a custome welcome messgae for when my bot first joins?

thorny hinge
#

@earnest phoenix No need to ask to ask because when you ask to ask you're already asking something mmLol

#

For custom welcome messages you need a database

fathom pebble
#

first joins what?

earnest phoenix
#

a guild

quiet bobcat
#

For when the bot joins @thorny hinge

#

👀

fathom pebble
#

add message to guildcreate event i think

quiet bobcat
#

Yeah

earnest phoenix
#

ok

quiet bobcat
#

and then find the primary channel and send the message in there

thorny hinge
#

on guildcreate just do channel.send("hey")

fathom pebble
#

@thorny hinge you need to know the channel

quiet bobcat
#

^

fathom pebble
#

but some guilds dont have primary chhanel i think

#

isn't it deprectaed?

quiet bobcat
#

idk

thorny hinge
#

@fathom pebble they can do it themselves

#

channel = channel object

earnest phoenix
#

Please help someong

thorny hinge
#

You have to get a channel object

earnest phoenix
#

?

thorny hinge
#

As I just said

#

Do you know js?

earnest phoenix
#

Not all of it

#

Im still new to it

thorny hinge
#

Better learn js then

earnest phoenix
#

I am iam

thorny hinge
#

If you dont know what a channel object is, that's a problem

earnest phoenix
#

i've made 75% of my code without any help

#

yeah well can you please help me

thorny hinge
#

You can pass a guild object in the guildCreate event

#

Get a channel from there

scenic crest
#

what's the point of javascript arguments[i]

earnest phoenix
#

ok

fathom pebble
#

@earnest phoenix message not defined111111!

#

r u using msg or message?

earnest phoenix
#

message

thorny hinge
#

Message wont be defined in guildcreate

#

So get a channel from the guild object

fathom pebble
#

hmm

#

true

earnest phoenix
low rivet
#

where is channel defined?

earnest phoenix
#

how do i define it?

thorny hinge
earnest phoenix
#

Dude just tell me please

thorny hinge
#

I said get a channel object from the guild object

#

That's not hard

earnest phoenix
#

how tf do i do that

thorny hinge
#

I'm not spoonfeeding

fathom pebble
#

which means you need the id

earnest phoenix
#

Im fucking confused

fathom pebble
#

a user would have to give yiur a bot an id

thorny hinge
#

Nah

#

guild has a channels property

#

Use it

#

guild.channels is a collection of channels

#

Maybe get the first

fathom pebble
#

but sometimes its not the first u need

thorny hinge
#

Get the first one that the bot has perms to send

#

ezpz

earnest phoenix
#

Why cant you just tell me what the code is please

low rivet
#

because we don't spoonfeed

#

have u learnt javascript? thonkku

gusty topaz
#

Rule 7b zoomeyes

fathom pebble
#

and we're not allowed to. We could point you in the right direction but currently I'm not able to grab a link from the docs.

low rivet
gusty topaz
#

Org

#
low rivet
gusty topaz
low rivet
#

ez don't use djs

earnest phoenix
quiet bobcat
#

It tells you alot

#

👀

gusty topaz
#

Click guild

#

Then you will see info about the guild object

#

Lol

earnest phoenix
#

I went from GuildCreate From info i dont need

quiet bobcat
#

But...

#

That's the info you do need

earnest phoenix
#

i see nothing here telling me how to send a message in the guildCreate

low rivet
#

have u learnt javascript?

earnest phoenix
#

Im still learning it

low rivet
#

learn it first

earnest phoenix
#

i dont get why you can just help me with somthing so simple for you guys that i dont understand

fathom pebble
#

bc rule 7b

#

we cant give u the code

earnest phoenix
#

ffs

#

i actually want to kms

quiet bobcat
#

Look at the docs.

#

If you need, look up an example

earnest phoenix
#

I have been it telling me nothing

thorny hinge
#

But it does @earnest phoenix

#

It provides the guild object

#

Which has a collection of channels

#

And you can send a message to one of them

earnest phoenix
#

It wont let me tho

thorny hinge
#

Because you're doing it wrong

#

Show me what you have

earnest phoenix
#

im trying all sorts of code but nothing is wroking and apparenlty asking one simple question about code is "Classified" as spoonfeeding

quiet bobcat
#

that doesn't look like all sorts of things

gusty topaz
#

why message.channel.send

quiet bobcat
#

^

gusty topaz
#

there is no message object in that context

earnest phoenix
#

omfg

gusty topaz
#

you have a guild object

#

the guild object contains a channels object

earnest phoenix
#

I FUCKING KNOW I HAVE THE GUILD OBJECT

gusty topaz
#

the channels object is a collection

#

you can do collection.first() for instance

#

then you have the channel object

#

where you can call send

earnest phoenix
gusty topaz
#

why did you do .collection

restive silo
#

oof

gusty topaz
#

i said channels is a collection

#

every collection has first()

earnest phoenix
#

but guild.channels.send wont work]

#

i get an error

fathom pebble
#

guild.channels.first i think

gusty topaz
#

because the collection object does not contain a send method

thorny hinge
#

^

gusty topaz
#

read this

#

please

thorny hinge
#

You must get a specific channel from the collection

#

Also learning all of js's basic concepts before you make a bot helps alot

gusty topaz
#

well

#

"fully"

#

you don't need to know everything about the language

#

but being profficient helps

frail kestrel
thorny hinge
#

You need to know all the basic concepts at least

gusty topaz
#

yes

thorny hinge
#

I should reword that

earnest phoenix
frail kestrel
#

im a basic concept of life

#

I mean what

gusty topaz
#

and you need to know how to read fucking documentation

#

@earnest phoenix most likely

earnest phoenix
#

Fucking omg

#

finally

#

thanks

#

turtle

gusty topaz
#

ehm

earnest phoenix
fathom pebble
#

👍

thorny hinge
#

Anyone know how to import a json file to a rethinkdb table using rethinkdbdash?

#

I tried using the native rethinkdb import command but it says I need the python driver GWmythiBlobLUL

#

And Im using nodejs so Im using rethinkdbdash

earnest phoenix
gilded blaze
#

why does \➡️ \⬅️ return unknown emoji when reacting?

low rivet
#

because its a combo emoji

gilded blaze
#

wat

true adder
#

That does not seem to be a discord emote. ➡ ⬅ are discord emotes what you typed is not.

elder rapids
#

⬅️

#

Those are discord emotes

#

You do realize discord stylizes the unicode character

#

You can escape the regular emotes with \ \⬅️

earnest phoenix
#

\👋

#

hm nice

thorny hinge
#

So I converted all my sqlite tables into json files, here's one of them

{
    "userprefixes":
    [
        {
            "userId":"222521619741016064",
            "prefix":"👀"
        },
        {
            "userId":"297433416998191127",
            "prefix":"..."
        },
        {
            "userId":"392299545821970442",
            "prefix":"."
        },
        {
            "userId":"298432861630103552",
            "prefix":"Mee6"
        },
        {
            "userId":"402266925670989834",
            "prefix":";"
        },
        {
            "userId":"283353337292783616",
            "prefix":"."
        }
    ]
}

I'm using rethinkdb now, how can I import the json file into a rethinkdb table? The native rethinkdb import command only works with the python driver ;-;

#

couldn't find an answer anywhere

#

(╯°□°)╯︵ ┻━┻

fervent steeple
#

.json files

#

NO

#

PLEASE

thorny hinge
#

@fervent steeple you tell me how else I'm gonna transfer it then mmLol

fervent steeple
#

manually

wooden shoal
#

manually

fervent steeple
#

:D:D

wooden shoal
#

lmao

thorny hinge
#

Nah

#

Some tables have thousands of lines of data

#

Literally

fervent steeple
#

i dunno

#

who is using .json for database

#

only you

thorny hinge
#

I wasnt

fervent steeple
thorny hinge
#

I was using sql

wooden shoal
thorny hinge
#

But you cant simply transfer sql to rethink in a flash, u gotta convert to json or csv first

#

@wooden shoal as I said u need the py driver

wooden shoal
#

oh

thorny hinge
#

Welp

#

So does anyone here have rethinkdb experience? ;-;

earnest phoenix
#

message.channel.send({embed: { color: 0xFF0069, description: `[Result 1](${links[0]})\n\n[Result 2]\(${links.slice(1, 3).map((l) => `<${l}>`).join('\n')}\)`}});

#

why dafak

#

even without the \) or \( it doesn't work

pale light
#

why would it work with \

uncut slate
#

that's probably what's fucking it up ^

pale light
#

I request a link to a rethonkdb js tutorial

worn ridge
#

How can I make my bot 'watching' something

#

?

pale light
#

lib?

worn ridge
#

Pyton

pale light
#

idk

wooden shoal
#

lmao

#

Can I get some help with websockets? I'm not really sure how you are supposed to log in with them.

#

also js

#

Like if I have a website, how would I upload my bot's guild count to it?

inner jewel
#

don't use websockets for that

#

use a REST api

wooden shoal
#

oh ok...

#

but how would I log in...

#

I am really new at this

inner jewel
#

"log in"

#

use the authorization header

wooden shoal
#

oh ok..

uncut slate
#

inb4 stores bot token clientside

prime cliff
#

storing bot token on a http web server as the index page

cunning remnant
#

Anyone know a google parameter that forces safe search? This has to be in the search term area and cannot be a url modification.

edgy vale
#

i've never seen that exit code

inner jewel
#

0xC0000005 is segfault

trim plinth
#

How to insert a mention of the author of a message in a message? Because I want to polish my kill command by making show a mention of a user instead of a username (I'm using discord.js as the library)

uncut slate
#

msg.author.toString()

#

alternatively if you're using string concatenation you can just use msg.author

weary lily
#

can someone help me?

#

i'm making a discordia luvit bot in lua

#

it says i should check the token but in the code everything is good

#
local discordia = require('discordia')
local client = discordia.Client()


client:on('ready', function()
    print('Logged in as '.. client.user.username)
end)


client:on('messageCreate', function(message)
    local cmd, arg = string.match(message.content, '(%S+) (.*)')
    cmd = cmd or message.content

    if cmd == ",test" then
        message.channel:sendMessage("tset,")
    end

        
end)
        
client:run("it's the token from the discord app website in quotation marks like those >")
pale light
#

discordio?

earnest phoenix
#

discordia

weary lily
#

discordia

#

it says the token is incorrect

#

as you can see in the image

pale light
#

ur using your app token?

earnest phoenix
#

^

pale light
#

in the click to reveal

weary lily
#

i did

earnest phoenix
#

lol

weary lily
#

and i copied it

#

i even tried using the client secret

earnest phoenix
#

you don’t use client secret

weary lily
#

i know

trim plinth
#

client secret can't help you with bots

weary lily
#

but i tried

bright spear
#

ask in the discordia server maybe?

weary lily
#

they have one?

worn ridge
#

Try with another application

earnest phoenix
#

it’s just discord api server

trim plinth
#

@weary lily try checking for typos or fuckups in your code

weary lily
#

it's not about typos

trim plinth
#

thats all you can do for now

rough pelican
#

xd

cold ginkgo
#

What about the typos Thonk

weary lily
rough pelican
#

did u have a space at the end or beginning?

pale light
#

copy+pasted GWjustinThonkEyes

earnest phoenix
#

^^

#

tis

cold ginkgo
#

Make sure you are using the actual token

weary lily
#

i am

#

i even tried restarting the token

trim plinth
#

reseting?

earnest phoenix
#

restarting?

#

wut

weary lily
#

i mean

#

reseting yeah

earnest phoenix
#

lol

#

maka new app

#

and try again

weary lily
#

gmm

#

hmm

earnest phoenix
#

imm

#

jmm

cold ginkgo
weary lily
#

i know

earnest phoenix
#

is it even in a server?

#

well that wouldn’t matter i think

weary lily
#

it is

#

still the same error in the new app

#

i'm gonna try my old bot

cold ginkgo
#

Ok

weary lily
#

nothing

#

i even removed pause from the run bat thing

#

i'm gonna try discordia serve4r

trim plinth
#

don't do that

#

keep pause in your batch files

weary lily
#

yeah

mortal ore
#

Artek what client libary are you using?

weary lily
#

?

pale light
#

discordia

earnest phoenix
#

maybe his discordia is out of date?

weary lily
#

yes

earnest phoenix
#

i doubt it tho

weary lily
#

i used github

#

and cmd

#

to install luvit and discordia

gusty topaz
#

For discordia, in the login stuff

weary lily
#

i did

gusty topaz
#

I think you need to prefix your token witg bot-

weary lily
#

oh

gusty topaz
#

So you have bot-MyBotsToken

weary lily
#

in the quotation marks?

earnest phoenix
#

yes

mortal ore
#

Yes

gusty topaz
#

Well

#

bot.login("bot-actualToken")

rough pelican
#

try it without

weary lily
#

yeah

rough pelican
#

x

#

xd

weary lily
#

the same error

gusty topaz
#

Hmmm

mortal ore
#

try it without questions marks and just put your token there

weary lily
#

i did

#

and it came up with a diff error

#

maybe it means something?

#

i'll ss the error

earnest phoenix
#

yes

gusty topaz
#

Sorry

mortal ore
#

yes

gusty topaz
#

Checked on github

#

Its client:login("Bot yourtoken")

weary lily
#

oh?

earnest phoenix
#

oh don’t -

weary lily
#

i leaked it

#

quick

gusty topaz
#

The bot part being upper case

mortal ore
#

xD

weary lily
#

aaaa

gusty topaz
#

Also put it in quotes

#

Its a string

earnest phoenix
#

del pic

weary lily
#

nah

#

i changed token

gusty topaz
#

Anyway

earnest phoenix
#

k

mortal ore
#

xD

pale light
#

did I just see someone leak a token

weary lily
#

yeah

earnest phoenix
#

yes

weary lily
#

i changed it

mortal ore
#

41313o1o31

#

xD

gusty topaz
#

Actually

pale light
#

that doesn't look like a real token

uncut slate
#

@earnest phoenix that's not the actual token

gusty topaz
#

The first part is useless

earnest phoenix
#

lol

weary lily
#

oh?

uncut slate
#

the first part is useless, yeah

mortal ore
#

xD

pale light
#

thats only the first part

weary lily
#

well i just helped myself by leaking

gusty topaz
#

It's separated with dots

uncut slate
#

@weary lily it will be the same after changing it, the first part

gusty topaz
#

Anywat

weary lily
#

oh

gusty topaz
#

Anyway

#

Let me repeat what you gotta do

#

client:login('Bot yourtoken')

mortal ore
#

client:run('Bot INSERT_TOKEN_HERE')

gusty topaz
#

Notice the quotes

mortal ore
#

:l

gusty topaz
#

Oh it's run

#

Right

mortal ore
#

xD

weary lily
#

i'll try

gusty topaz
#

Mind the quotes

mortal ore
#

Yes

weary lily
#

ik

#

but someone told me to remove them

gusty topaz
#

What.

weary lily
#

doesn't work

mortal ore
#

don't Its different them discord.js

weary lily
#

remove the first part?

mortal ore
#

:l

gusty topaz
#

What?

mortal ore
#

?

weary lily
#

idk what to do anymore

gusty topaz
mortal ore
#

I recommened using discord.js xD

gusty topaz
#

Last part of step 4

mortal ore
#

Hmm 😛

weary lily
#

i'll try and copy that code

#

but idk why it's split to 2 parts

earnest phoenix
#

oof

weary lily
#

3

#

4

gusty topaz
#

2 parts?

#

What?

weary lily
#

nothing

mortal ore
#

🤦

gusty topaz
#

Treat the token as a string because it's a string. Its not a variable, its a string. You gotta put quotes around it. You also need to put Bot in the same quotes before the token

weary lily
#

ayy

#

it works

gusty topaz
#

Ok

earnest phoenix
#

lol

mortal ore
#

Yay

gusty topaz
#

Good

mortal ore
#

xD

weary lily
#

i copied that script from the tutorial

#

here have a rep+ thing for memory

gusty topaz
#

Hmmm

earnest phoenix
#

hmmmm

gusty topaz
#

Rep+ ?

weary lily
#

yeah

#

just a thing for you to remember

#

ikd

#

idk

gusty topaz
#

Hmmmm, ok

mortal ore
#

Its a steam thing Myself

#

xD

#

Usually used for trading rep

weary lily
#

yeah

gusty topaz
#

I use steam for games not social

weary lily
#

reputation

gusty topaz
#

I never trade just sell my shit on marketplace

mortal ore
#

xD

gusty topaz
#

/shrug

weary lily
#

¯_(ツ)_/¯

mortal ore
#

fail

weary lily
#

¯_(ツ)_/¯

pale light
#

\shrug

gusty topaz
#

I'm on mobile

weary lily
#

why doesn't it work for you

#

you have to add a space

#

test ¯_(ツ)_/¯

pale light
#

no u don't

gusty topaz
#

No, im on mobile

weary lily
#

omg

pale light
#

you just have to be not on mobile

weary lily
#

i made a bot about penguins

gusty topaz
#

Anyway, I am going back to shit posting on reddit

pale light
#

@mortal ore don't post that here

mortal ore
#

I removed it

#

Sorry

south finch
#

it works on mobile for me hmmm

mortal ore
#

xD

pale light
#

👏 nice

gusty topaz
#

iOS?

south finch
#

yea

gusty topaz
#

I think the iOS app already has that

south finch
#

it does

#

anyway

#

we're in development

#

so please move this conversation to general

weary lily
rough pelican
#

hm

#

eh depends on ur preference

weary lily
#

idk

#

i think that when it will be long it will look weird

#

alright i gtg looks good.

tiny turtle
#

thats how I have them setup now

#

works fine for me but my bot is a on a few servers and this part dont work for them

scenic crest
#

@tiny turtle you could prompt people to mention the channel like #general

#

then get the ID from mentions

tiny turtle
#

even from the other servers, would i have to do this for all the servers the bots added to?

pale light
#

do share links from gists on github automatically give the end recipient editing permissions?

tiny turtle
#

I am trying to get them set up so lets say it searches for a "signup page" and "trials" instead of the channels ID

#

would be much easier

worn ridge
#

Is there a limit for updating the presence / game of the bot? I want the bot to switch the game every 10 seconds ...

austere meadow
#

presence updates are 5/60s last time i checked

#

but why do you need to switch it every 10 seconds

scenic crest
#

probably a rotating status:
10 servers -> 123 users -> shard 0 -> !help for help

peak palm
#

basically all of my bot's commands @mention the author, is that bad practice?

scenic crest
#

it's uneccessary

#

say you toggle feature X, saying "@scenic crest you toggled feature X" is a bit redundant

#

seeing that they were typing in that channel a split second ago anyway

#

I personally never use mentions, but imo it'd make sense if there's some sort of delayed task/cooldown

#

i.e. the bot notifies you when you can do X again

#

(opt in ofc)

tiny turtle
earnest phoenix
hushed oyster
#

dun dun dun

restive silo
#

okay so

earnest phoenix
#

Someone help me please if i add my bot to a new server it crashes because of the guilder memeber add but if i do it to my friends it worked as shown in the top pic

restive silo
#

how sure are you that the first channel of an server is always a TextChannel?

#

you aren't

#

😉

earnest phoenix
#

Can some one help me please

restive silo
#

i just did

earnest phoenix
#

It crashes on my server and my first channel is a text

restive silo
#

collections aren't sorted

earnest phoenix
#

and everyone can talk in it

restive silo
#

they are completly random

earnest phoenix
#

so what do it do?

restive silo
#

filter the channels collection by channel type

earnest phoenix
#

ow would i do that?

restive silo
#

use .filter() on guild.channels

#

and give it a function what tests if channel type equals TextChannel

earnest phoenix
#

so guild.channels.filter().send?

restive silo
#

give it a function what tests if channel type equals TextChannel

earnest phoenix
peak palm
restive silo
#

@peak palm stop

#

if you dont know how to make a function than you should really learn basic js

earnest phoenix
#

omg How come you cant help me on one question, ohh wait it's classified as spoonfeeding.

restive silo
#

yes

#

it is

#

because thats pretty basic and i gave you the answer already

#

the only thing you need to do is transform it into code and add it in your bot

earnest phoenix
#

FUCK YOU

pale light
peak palm
#

is reacting with an ❌ an acceptable way to acknowledge unknown commands

restive silo
#

yes thats completly fine

#

well

#

aslong as you dont react to all messages ofc 👀

#

you should always silently fail unkown commands

austere meadow
#

^

#

you cant react or respond to unknown commands on this guild

restive silo
#

its fine if wrong input is provided as example

peak palm
#

so if a user sent a message with the prefix but the command was unknown

#

reacting with an ❌ would be bad

pale light
#

yes

#

because thats an unknown command response

peak palm
#

hmm

#

time to rewrite my unknown command response system again

worn ridge
#

Can someone make an example for me how to get the upvots for a bot in python?

vagrant musk
#

oof

frail kestrel
#

I think you can

#
for vote in votes
#

votes being the name of the api endpoint

#

or if you want to get an individual user's username:

for message.author.name in votes
#

I think that should work

#

havent tested it mmLol

frozen yew
#

im trying to figure out how to make a bot for my sever and im so confus ed

#

can someone help me lol

bright spear
#

@frozen yew you have to code it

#

if you don't know how to code, just add one of the many bots other people have made to your server

frozen yew
#

ok

hushed oyster
#

so

earnest phoenix
#

the code is essentially the same as the jda example

#

just slightly different

drifting shell
#

^

#

slightly different being it has a for loopto iterate over the shards, but its still effectively the same snippet

cobalt mountain
#

sup

hushed oyster
#

#general if you're just looking to converse @cobalt mountain

#

hmm

#

well

#

i can't think of a problem

#

it may be a problem with DBL

drifting shell
#

That's the only thing I can think of but didn't want to start of a sentence with "fix your api" lol

hushed oyster
#

lol

low rivet
#

what's the issue?

drifting shell
#

Tbf its still better than carbons api...they just give you a the parameters and say "use these"

#

@low rivet Bot statistics aren't submitting to the API

#

but the page completes successfully (response code 200)

low rivet
#

obviously....

#

your bot isn't added yet

drifting shell
#

@worthy marten @low rivet

low rivet
#

-botinfo @worthy marten

gilded plankBOT
#
Bot info
ID

329668530926780426

Username

Sheepy

Discriminator

9008

Short Description

A cute multi-purpose bot for music, economy, levels, temp voice channels, and more!

Library

JDA

Prefix

(customizable)

Upvotes

18

Server Count

No server count

Owner(s)

@deft galleon

drifting shell
#

its been approved or compliant or whatever it is

low rivet
#

-owners @worthy marten noembed

gilded plankBOT
#

Sheepy is owned by Jake S.#0001

low rivet
#

you aren't the owner GWcfcThonk

drifting shell
#

I work on it with him

#

@earnest phoenix please confirm this lol

low rivet
#

then he should add you as an owner

#

anyway, what's the url you are posting to?

drifting shell
#
https://www.discordbots.org/api/bots/329668530926780426/stats
earnest phoenix
#

yeah he works on it

drifting shell
#

That's the URL specifically

low rivet
#

@earnest phoenix Add him as an owner in the edit page

earnest phoenix
#

will do

low rivet
#

@drifting shell did you provide the Authorization header?

drifting shell
low rivet
drifting shell
#

yep

earnest phoenix
#

added him

low rivet
#

w8 lemme check something

drifting shell
#

Thank you @low rivet

earnest phoenix
#

-botinfo @worthy marten

gilded plankBOT
#
Bot info
ID

329668530926780426

Username

Sheepy

Discriminator

9008

Short Description

A cute multi-purpose bot for music, economy, levels, temp voice channels, and more!

Library

JDA

Prefix

(customizable)

Upvotes

18

Server Count

No server count

Owner(s)

@deft galleon
@drifting shell

low rivet
#

@drifting shell it's supposed to be:
Authorization: TOKEN is that correct?

drifting shell
#

yes

#

I believe so

low rivet
#

let me look at your code w8

drifting shell
#

#
this.key
``` Being the API key
low rivet
drifting shell
#

@earnest phoenix ^

earnest phoenix
#

@drifting shell ^

low rivet
drifting shell
#

:/...lol

earnest phoenix
#

;p

drifting shell
#

@low rivet {"error":"Forbidden"}

low rivet
#

check your api token from the edit bot page again

drifting shell
#

@earnest phoenix ^

#

Just checked the token, still forbidden

low rivet
#

no extra spaces or anything right?

drifting shell
#

nope

#

literally putting in the token as a string now instead of from a file

#

oh wait shit

low rivet
#

and there's a 60 req/min ratelimit..

#

and once hit, you gotta wait an hour

drifting shell
#

Oh yeah my bad

#

I was putting in the wrong bot id

#

oops

#

Because I didn't remove the getSelf().getId() lol

low rivet
drifting shell
#

OOF

#

server count

#

thank you ❤ @low rivet

low rivet
drifting shell
#
    private static final String URL = "https://www.discordbots.org/api/bots/329668530926780426/stats";
    private static final MediaType JSON = MediaType.parse("application/json");
``` I found the cause @low rivet Can you see anything wrong with these?
low rivet
#

i don't know java but I don't see anything wrong in that snippet

#

did u include the auth header though?

drifting shell
#

These 2 were the cause of it

#

and yeah I did, the problem is solved, just don't know why this would cause it

#

Something I've learnt about the responses with teh api, is that if its {} then it worked, if not its failed @low rivet

#

by that I mean the response body

#

@low rivet Do you have any control over the documentation or are you just another developer?

low rivet
#

I'm a developer GWjustinEyesReverse

drifting shell
#

Who do I ask for a change to the documentation @low rivet ?

low rivet
grand cosmos
#

-botinfo @polar mist

gilded plankBOT
#
Bot info
ID

322379188730331136

Username

Sakura - 桜

Discriminator

5407

Short Description

Simple bot including a music command and some other useful features.

Library

JDA

Prefix

/

Upvotes

1

Server Count

No server count

Owner(s)

@grand cosmos

low rivet
drifting shell
low rivet
craggy token
#

-botinfo @devout ferry

gilded plankBOT
#
Bot info
ID

407272032431112202

Username

Goomba

Discriminator

1291

Short Description

A multipurpose bots which includes fun commands such as fml and kick/ban commands (and per-guild config)

Library

discord.js

Prefix
Upvotes

1

Server Count

No server count

Owner(s)

@craggy token

digital coral
#

hi

austere meadow
#

@digital coral what lib do you use?

digital coral
#

discord.js

trim plinth
#

in js you do setGame('fuck doodle shit') and it'll say fuck doodle shit as the bots rp

austere meadow
#

what

trim plinth
#

rp = rich presence

digital coral
#

but how do i change it to watching

austere meadow
#

yeah but he wants WATCHING as the presence

trim plinth
#

then do setGame('WATCHING') instead

austere meadow
#

no

#

hang on

#
presence.activity = {};
presence.activity.type = "WATCHING";
presence.activity.name = "test";
client.user.setPresence(presence);

i would recommend doing it like this

trim plinth
#

wait NO

#

I forgot

digital coral
#

ahh thx

austere meadow
#

wait what version do you use @digital coral ?

trim plinth
#

its setActivity for discord.js

scenic crest
#

Watching is an unsigned integer in raw discord api

#

Pretty sure watching is 2

digital coral
#

uhh i havent checked but i can upgrade or downgrade if needed

austere meadow
#

you can use a number or "WATCHING" in d.js

digital coral
#

oh kk thx my pc is downstairs so yh

austere meadow
#

you don't need to upgrade or anything its just that im not sure if setPresence is in v11

digital coral
#

ahh kk

trim plinth
#

its bot.user.setActivity I think for v11

#

or client.user.setActivity, whatever you use

digital coral
#

kk thx for the help

trim plinth
#

yw

austere meadow
digital coral
#

eval this: while (true) {}

#

it crashed my bot

#

im adding that as a command to admins

#

!crashthisshittyafbot

trim plinth
#

hmm an eval

digital coral
#

why dont i allow eval for everyone for 5 minutes

#

soo much fun people downloading rats to my pc

#

yay

#

wait bad ide

#

A

trim plinth
#

(just going to say I think having an open eval command is VERY dangerous and it should probably be restricted to you only but thats your choice)

digital coral
#

ik i restricted it to my id but it looks like fun just setup a vm incase someone downloads a file to my pc xD

#

and people wo;; steel my token

trim plinth
#

even for 5 minutes, thats just..eh

digital coral
#

@earnest phoenix got php syntax wrong

#

he wrote echo test

#

instaid of echo "test";

#

his 12 tbh

gusty topaz
#

really?

#

Banne

digital coral
#

lol

trim plinth
#

and I don't suggest letting people know of your eval command's existence either, if somebody besides you tries to execute an eval command, just go out silently with a return

#

but again, your choice

#

¯_(ツ)_/¯

digital coral
#

it returns true if it has my id else it says invalid perms or something, i will remove that

#

When you have eval enabled for everyone on your selfbot

Me:
!eval
message.reply(client.token)

ctrl + shift + i > Application Lcal Storage > Replace > Post Im gay

worn ridge
#

How can I get the votes of my bot from the dbl api? How do I authorize my self with the dbl_token?

austere meadow
#

you need to make a get request to the votes endpoint with your bots token as an Authorization header

frail kestrel
#

o

worn ridge
#
    headers = {'Authorization': dbl_token}
    api_url = 'https://discordbots.org/api/bots/' + str(bot.user.id) + '/votes'
    async with aiohttp.ClientSession() as session:
        await session.get(api_url, headers=headers)``` Like this?
#

@austere meadow

austere meadow
#

yeah i dont really use python but that should work

worn ridge
#

Hmm ok. I think its working, but I dont know how to save the requested upvotes in a variable

austere meadow
#

do you know how to get the response from the get request in py?

#

just save the response

worn ridge
#

No I dont ... 😦 😄

austere meadow
#

well thats unfortunate because i dont either

#

maybe try looking up on google how to get the response from aiohttp get request?

gusty topaz
#

How do I send a role mention? ( I have the role ID and nothing else )

#

From a bot

austere meadow
#

<& + role id + >

gusty topaz
#

thanks

worn ridge
#
async def get_upvotes(bot):
    headers = {'Authorization': dbl_token}
    api_url = 'https://discordbots.org/api/bots/' + str(bot.user.id) + '/votes'
    async with aiohttp.ClientSession() as session:
        async with session.get(api_url, headers=headers) as response:
            return await response.text()``` Im now getting the response from it, but its Unauthorized again ...
#

😕

#

Or is there a differents between 'Only for Bot Owner' and 'Requires Bot token'?

fathom pebble
#

@worn ridge they both need your bot token

earnest phoenix
#

^

worn ridge
#

But why do I still get {"error":"Unauthorized"}

low rivet
#

becuase your token is invalid

worn ridge
low rivet
#

no extra spaces?

worn ridge
#

No

earnest phoenix
#

anyone knows how to make a timeout thingy

#

it smh didn't work with me

edgy vale
#

what kind of timeout thing?

#

that it deletes a message after some time?

earnest phoenix
#

nope

#

it edits a message after x time

icy lynx
#

What lang?

#

Is it something like !r rolldice?

frail kestrel
#

if ur using js

#

js has a .setTimeout function u can use

heady zinc
#

^

#

as for deleting a message d.js has a parameter for that

drowsy falcon
#

how can i make my bot delete the message that was sent after 10000ms?

#

d.js

restive silo
#

call .delete(10000) on the resolved msg object from the send Promise

drowsy falcon
#

ok

#

it deletes my message?

#

oof

fathom pebble
#

What is the method for resetting a user's nickname using discord.js?

gusty topaz
#

GuildMember.setNickname(GuildMember.user.username)

earnest phoenix
#

how to make your bot work

gusty topaz
#

??

#

elaborate

earnest phoenix
#

how to make your bot online

gusty topaz
#

language?

#

library?

earnest phoenix
#

how to make your bot online

#
  1. Pick a lang u want to code it
gusty topaz
#

I asked what language is the bot written in

#

and what library are you using

earnest phoenix
#

he doesnt even know

#

i presume he doenst know wat coding is 🤔

drowsy falcon
#

@earnest phoenix oof

earnest phoenix
#

oof wat

#

do u know wat coding is?

#

yes but how you put in coding dont show

drowsy falcon
#

????

gusty topaz
#

I cannot seem to understand that sentence

drowsy falcon
#

put in coding dont show

#

???

earnest phoenix
#

?????

#

coding

#

do u know any coding language?

#

code

drowsy falcon
#

javascript, C# etc

#

????

earnest phoenix
#

🤦

drowsy falcon
#

sorry

earnest phoenix
#
do u know any coding language?
jacksonDTM - Today at 8:56 PM
code```
drowsy falcon
#

ur in the wrong place

earnest phoenix
#

i am mind blown @drowsy falcon

drowsy falcon
#

same

gusty topaz
#

also

#

its not coding language

#

its programming language

#

okay?

earnest phoenix
#

true

drowsy falcon
#

yeah

#

but he still doesn't know

earnest phoenix
#

can someone help me think of a nerdy type command like binary, weather and stuff

drowsy falcon
#

no xd

earnest phoenix
#

😦

gusty topaz
#

oh yes

earnest phoenix
#

i made a binary command on meh bot

drowsy falcon
#

doing my homework rn

earnest phoenix
#

k

gusty topaz
#

playback .xm modules in voice channels

earnest phoenix
#

-turtle

drowsy falcon
#

guys

earnest phoenix
#

gives u a random turtle info out of 100 diffenrt types of turtles

#

ok i find code

drowsy falcon
#

what do you use for hosting?

gusty topaz
#

a VPS

drowsy falcon
#

kk

earnest phoenix
#

a VPS is dank

gusty topaz
#

I used to host on my RPi

#

but after I added a soundboard

drowsy falcon
#

im using Glitch

gusty topaz
#

it brought my ADSL to crawl

drowsy falcon
#

beacuse im a n00b

gusty topaz
#

and made the pi overheat

drowsy falcon
#

rip

gusty topaz
#

having 10/0.5 ADSL is no fun

earnest phoenix
#

tell me a differnt nerdy command

#

maybe like. . . a caculator?

gusty topaz
#

I was running a bot on that

drowsy falcon
#

ok

gusty topaz
#

ehm, a calculator is kinda generic

#

but sure, you could use mathjs

drowsy falcon
#

translate?

earnest phoenix
#

🤔 hmmm

#

maybe

gusty topaz
earnest phoenix
#

ik

drowsy falcon
#

how can i make my bot copy random image from a subreddit (r/dankmemes) and send it when the command is sent?

gusty topaz
#

you need to connect to the reddit api

#

fetch a post

#

then link it

drowsy falcon
#

but from a json?

#

the subreddit has a json

gusty topaz
#

well

#

make a http request to it

#

and pick a random post

#

lol

drowsy falcon
#

ok

#

thanks

earnest phoenix
#

is there awaitMessages for eris? can’t remember

#

@restive silo whatay you look at me for

#

mom

#

@earnest phoenix how to add bot on sword

uncut slate
#

@earnest phoenix not by default, I made a helper that lets you await one

gusty topaz
#

jacksonDTM, "Do not @mention people randomly."

earnest phoenix
#

you did ?

uncut slate
#

yeah

gusty topaz
#

this is what it says in description of this channel

uncut slate
#

it only lets you await a single message though

earnest phoenix
#

hmmm

#

i must DISCOVER

uncut slate
#

it's all I need myself, you might need more functionality

earnest phoenix
#

thanks mr dyno meme man

#

🤔 dblMod ?

#

xD

uncut slate
earnest phoenix
uncut slate
earnest phoenix
#
if (message.content.startsWith(prefix + 'poll')) {
    let args = message.content.split(" ").slice(1).join(" ");
let pollsend = await message.channel.send(args)
    if(!args) return message.channel.send("** ❌ | Merci de donner la question**"); 
    message.react(✅)
    message.react(❌)
  }
  pollsend```
drowsy falcon
#

ok

earnest phoenix
#

Error?

#

Hlp me pls

wooden shoal
#

what is the problem?

earnest phoenix
#

I dont send

#

go testing-1 like that I could use Translate Bot because I speak English wrong

#

@wooden shoal <3

wooden shoal
#

the error is the message.react(✅). it needs to be a string. message.react('✅')

earnest phoenix
#

"" is important

austere meadow
#

@neat falcon do you want to check the name of the variable?
ie, var test = "hello" would not check "hello" but rather test?

neat falcon
#

i would like to check if activeWin() contains = Google Chrome Thonk