#development

1 messages · Page 499 of 1

sick cloud
#

whats the best/most lightweight request lib for node?

slate kayak
#

hello does anybody know how to start making a mixer,twitch and youtube stream announcer bot ?

sick cloud
#

@slate kayak mixer has a great api, easiest, just check it out. twitch requires some 24/7 service and is hard, just google it, as for youtube, it's virtually impossible (from personal experience) unless you understand pubsubhubhub and xml/subscriptions

slate kayak
#

ok

#

ty

sick cloud
#

np

earnest phoenix
#

dang

#

createPCMStream is hard

#

especially if ur like me and dont know tf is goin o

#

n

#

does the icons match?

#

does it look bad?

ivory pebble
#

Ya I would say just have them all as png files, or have something else

#

The above doesn’t really look nice, just my opinion

#

@earnest phoenix

#

Does anyone know the types of things that would cause a bot to have a bad ping?

sick cloud
#

@ivory pebble bad internet or overloaded shards

astral quail
#

Have slow internet

sick cloud
#

i just said that

#

no need to repeat

ivory pebble
#

Anything other than that

sick cloud
#

not really

#

a really poor bot or too many listeners can harm it

#

but not much

ivory pebble
#

Listeners?

sick cloud
#

event listeners

ivory pebble
#

Oh

#

Okay alright thanks

sick cloud
#

np

earnest phoenix
#

@ivory pebble which one? the top logo?

ivory pebble
#

Hmm?

#

I meant the discord

#

PayPal

#

Icons

#

They don’t match with the UI or each other

sick cloud
#

why not just use FA white icons

#

fit well

earnest phoenix
#

oh alright, but what about the

sick cloud
#

and expand lossless

ivory pebble
#

Ya

earnest phoenix
#

this button?

#

does it match?

sick cloud
#

no

earnest phoenix
#

the paypal?

ivory pebble
#

No not really

#

Remove the gradient

sick cloud
#

none of them do

ivory pebble
#

Change the font and color

#

I gtg sleep cya

sick cloud
#

use FA

earnest phoenix
#

i cant change font nope its my bots fonts

#

a font is a font

sick cloud
#

@earnest phoenix do you want me to spam you with it. just damn use FA

#

smh

earnest phoenix
#

whats fa?

#

@sick cloud

sick cloud
#

really

#

fa

#

font

#

awesome

astral quail
#

@sick cloud chill buddy, no need to get upset

sick cloud
#

i'm not?

#

lmfao

earnest phoenix
#

a link?

#

lol

#

i cant fine fa font

sick cloud
earnest phoenix
#

what is this

#

i know its for html icons

#

but

#

like?

sick cloud
#

they're..

#

icons

earnest phoenix
#

yeah for html

sick cloud
#

yes

earnest phoenix
#

yea

sick cloud
#

you copy the <i> code

earnest phoenix
#

...

#

dude

#

thats not the point

sick cloud
#

thats the directory of all icons FA has

earnest phoenix
#

the point is where is the font

sick cloud
#

why dont you read the top navbar

#

and click get started

earnest phoenix
#

i dont see

#

the get started

#

@sick cloud

sick cloud
#

they changed it tho

earnest phoenix
#

that doesnt say "get started"

sick cloud
#

YOU LITERALLY COPY THAT

#

(╯°□°)╯︵ ┻━┻

earnest phoenix
#

i placed that

#

into the header

#

nothign happened

sick cloud
#

did you put an icon in

earnest phoenix
#

i am confused

#

what is this?

sick cloud
#

ur not confused

earnest phoenix
#

is this a font? or an icon

#

or

sick cloud
#

ur just not trying

earnest phoenix
#

what?

sick cloud
#
  1. put the css in head
earnest phoenix
#

i'm a bit tried

sick cloud
#
  1. paste an <i> icon in
#
  1. profit
earnest phoenix
#

how is that css?

#

it looks like html

sick cloud
#

its a link

earnest phoenix
#

i put that in the header

sick cloud
#

that imports the css

earnest phoenix
#

wait

#

so it should replace

#

my other one for css?

#

this one?

#

that makes no sense

#

sorry i'm tried

sick cloud
#

no

#

you put it asa well

earnest phoenix
#

guys where is the best and cheapest place to host??

sick cloud
#

asking in multiple channels

stone scroll
#

config.json IS there

#

but it isn't detecting it for some reason

#

@wild phoenix

sick cloud
#

is it in that folder

stone scroll
#

ye

sick cloud
#

does it have a typo

stone scroll
#

nope

sick cloud
#

how are you requiring

stone scroll
#

what do you mean

sick cloud
#

literally show the code your using to require it

stone scroll
#

some code on le internet

sick cloud
#

step one is to stop copy pasting code and learn

stone scroll
#

thas what im doing

sick cloud
#

the only reason that error is appearing is because the file doesnt exist in that directory

stone scroll
#

so I put config.json in the commands directory

sick cloud
#

wait

#

../

#

use an extra dot

#

../ = back a dir

#

./ = current dir

#

you use ./ when the file is in the same dir

#

../ and ../../ etc when its in a lower down dir

stone scroll
#

or

astral quail
#

You want to use the config.js file inside your coin.js file right?

stone scroll
#

hm?

#

yea

sick cloud
#

then use ../ on config.json

#

in the file

astral quail
#

Can you show me the line with require in coin.js please.

sick cloud
#

i give up

stone scroll
#

tf do you mean

sick cloud
#

nobody fucking listens today

stone scroll
#

oh

#

the error

#

I am

#

but where in the code do I change

sick cloud
#

@stone scroll in the coin.js file change ./config.json to ../config.json

astral quail
#

Because he doesn't understands you.

sick cloud
#

how much more precise do i have to be

astral quail
#

He's still learning, no need to act like that.

stone scroll
#

that's a perfectly fine line of code

astral quail
#

It's your first time making a command handler?

stone scroll
#

yeah

#

I didn't want it all in index.js

astral quail
#

okay, can you show me your coin.js file in a hastebin please?

sick cloud
#

is message defined

#

codeblocks exist

stone scroll
#

I didn't need to define in index.js

#

how do I define it then

sick cloud
#

pass it through

#

as a function param

stone scroll
#

with what in it

#

function message(){wot();}

sick cloud
#

what

stone scroll
#

you just said

sick cloud
#

your using discord.js right

stone scroll
#

yes

sick cloud
stone scroll
#

should I just completely restart the bot

#

like start from scratch again

#

cuz it's kind of a mess rn

#

ye imma do that

late hill
#

Fun

stone scroll
#

FUCK I'M SO DUMB

#

I ASK LIKE 1289394 QUESTIONS

#

why

sick cloud
#

()

#

forgot to make the client

stone scroll
#

it's there

sick cloud
#

lmfao you forgot the , too

#

2 things tho

#

dont use sendMessage

#

and dont use var

topaz fjord
#

Isn't .startsWith a function

#

also using .startsWith let's me do g!help urushdhrudbduejdndi

#

Even if there is no parameters that you need to take in

white pebble
#

if(message.content.startsWith('g!kick'))

earnest phoenix
#

Also, kick is undefined

#

that too

#

also you don't need the if else code block

#

you can just put

#
if(!message.member.hasPermission('KICK_MEMBERS')) return message.channel.send('You need the "Kick Members" permission to do that.')
barren sage
#

^

#

that's what I do

red venture
#

Hey, newbie here, I'd like to know which project type I have to use for a bot ^^ any help appreciated ^^

earnest phoenix
#

...what

#

What language and library?

red venture
#

Uuuh, c# aand the DiscordBotsList.Api, the .NET library ^^

#

Nvm, been a complete moron ^^

earnest phoenix
#

got a question

#

or

#

green or blue

fair dawn
#

Blue

cold basalt
#

Blue is rad

quartz kindle
#

the green design is much better tho

#

just make the green blue if you like it more

red venture
#

Hey, how do I send a message to a predetermined channel? Like when I write "!ping", "pong!" is written in the Bot Messages channel?

quartz kindle
#

yourclientname.channels.get("channelID").send("message")

red venture
#

ChannelID isn't the channels name, right?

quartz kindle
#

nope, is the channel's unique id

red venture
#

How to I get this...

quartz kindle
#

you can enable developer mode in your discord, then you can right click a channel and copy id

red venture
#

Aaah

#

But when I would be adding the bot to another channel it wouldn't work, right?

unborn estuary
#

How can I make a simple random generator that only selects users in the channel, with pyhton?

red venture
#

I would guess with an array and a rng that takes a number corresponding with an ID... is this even possible?

quartz kindle
#

bots are not added to channels, they are added to servers. it will work on all channels that the bot is in

#

as long as the bot has permissions to send messages

#

channel ids are also unique and independent from servers

red venture
#

I meant when I add the bot onto another server, both have the general chat but I only take the ID of one of them

quartz kindle
#

the channel id is unique among all servers

#

if you use the id from the general chat in your server, the message will go only there, not the other server

red venture
#

Okay, that's what I wanted to know

#

So a user of mine would want to choose another channel on his server, how can I integrate that?

quartz kindle
#

you would need a database to keep track of which channel ID should be selected in which server

red venture
#

And how can I add new ones?

quartz kindle
#

or if you want it easier (less ideal but many people do it), you can define a channel name, and tell people to always use that channel name so the bot can find it

#

with a database, the person would need to use a command containing the channel mention or id

red venture
#

Would it be possible to use a command to add the channel? Like the bot joined and you write in general "!addChannel Test" and the bot saves this

quartz kindle
#

and your bot should receive this command, and add the server and channel ids to your database

#

as a key value pair (probably)

#

depends how you want to structure your database, and what kind of database you're gonna use

red venture
#

Would say the key is the server id

quartz kindle
#

yup

red venture
#

So when the message is sent it checks the server first and then sends it to the corresponding channel id

quartz kindle
#

exactly

red venture
#

What database would you recommend?

drowsy lily
#

postgres master race

red venture
#

Postgres?

earnest phoenix
#

uhm guys I have rlly stupid problem

#

I downloaded my bot from github for beta

#

but when try to open bot

#

it's automaticly shutdown

#

why

red venture
#

@drowsy lily Do you know how I can implement PostgreSQL into a windows console app?

drowsy lily
restive silo
#

Windows Console App?

#

You mean C# Console application or what?

#

👀

earnest phoenix
#

code it, put the token into your code and run it mmLol

red venture
#

@restive silo Yeah, meant that. But it got solved otherwise

slate kayak
#

http://prntscr.com/l42xp5 i have a question why some bot show the server and the others N/A ? is there a way to change that so that it show on DBL ?

Lightshot

Captured with Lightshot

restive silo
#

it will show the server count what was posted to DBL's API

#

N/A means the owner didn't post it so far

slate kayak
#

ok and how can i do it @restive silo 😦

restive silo
#

post it to the api

quartz kindle
#

either send an http POST request yourself, or install the DBL API library for your prefered language

slate kayak
#

ok lik maby @quartz kindle please

quartz kindle
#

lik maby? wat?

slate kayak
quartz kindle
urban jay
gleaming glen
#

@earnest phoenix when i download hydrabolt/discord.js it gives this error: ```
C:\Users\Eren\Desktop\OvE\node_modules\discord.js\src\structures\APIMessage.js:75
const splitOptions = isSplit ? { ...this.options.split } : undefined;
^^^

SyntaxError: Unexpected token ...

sullen fractal
#

Turkmusun

gleaming glen
quartz kindle
#

which version of node?

#

spread operator in object literals is node 8.3.0+

stoic thunder
#

Salut

kind nexus
#

Salut

final remnant
#

I need more ram for my bot but the site I'm using doesn't offer me any more, what are some cheaper or free suggestions for hosting?

west raptor
#

What are you using at the moment

final remnant
#

Glitch

west raptor
#

Use galaxy Gate or DO

earnest phoenix
#

Hmm. Maybe take a look at Vultr

west raptor
#

Heard both are good

#

Or Vultr

earnest phoenix
#

You get a very good CPU for the price

final remnant
#

I just started sharding so that destroyed my RAM

earnest phoenix
#

An i7 6700 with 4 cores and 8 threads

final remnant
#

Sounds very appealing, thank you

topaz fjord
#

3 gigs of ssd Thonk

#

Galaxy gate is gud

earnest phoenix
#

@topaz fjord Yeah, that's the catch lol
But you get a beast of a cpu in return

#

It's a trade-off if you think of it

#

I'd say 3gb is enough for node.js and a bot, assuming it's not a massive bot

#

maybe a small DB too, but that may be pushing it

#

No other provider I know of gives you that good of a CPU for that price

earnest phoenix
urban jay
#

try !== true and not !== 'true'

earnest phoenix
#

Didn’t change

#

Still broken

west raptor
#

ur checking if they arnt and then sending the embed

#

look at the logic in the code

earnest phoenix
#

But how would I make it not send anything else

#

That’s the only way anybody told me

#

I removed the return and it still says I’m blacklisted

#

This does nothing if I add a ; to return it does the same as before

topaz fjord
#

bc your not checking if the user is blacklisted

earnest phoenix
#

It says I’m blacklisted by default

#

Oof

#

But it just sends the message with everything else

#

Guys

#

I have a question that I think I know the answer but I want to make sure

#

ok

#

Its 100% correct, the more traffic my website gets, it needs a faster hosting computer?

quartz kindle
#

yes, but it only starts to really matter once you get concurrent traffic

#

if you get 5000 requests per day, but in 10 second intervals, its not gonna make a difference

topaz fjord
#

if you get 50000 at an interval of 1 sec then it probs would mmLol

quartz kindle
#

xD

sick cloud
#

👏

topaz fjord
#

i thought you name said "thot i can"

solemn linden
#

hm

wheat marten
#

What can I use the JetBrains IDE for?

sullen path
#

Things

wheat marten
#

Should I use the Jetbrains IDE instead of Visual Studio Code?

night imp
#

@wheat marten if you get it for free (student) might as well if you like it

#

try both

wheat marten
#

I currently use VS Code but I am wondering because Jetbrains IDE is an IDE

night imp
#

it is pretty good

#

I wouldn't pay for it for web development though

wheat marten
#

oh

night imp
#

but if you are a student

wheat marten
#

wait

night imp
#

you get it for free

wheat marten
#

You can use it for web development

#

?

night imp
#

/ bot development

#

they have many different products

wheat marten
#

oh

#

I know that.

west raptor
#

depends what you are working with

wheat marten
#

I know about Jetbrains because I use Android Studio

west raptor
#

web dev - i would say stick with vscode
bot dev - vscode or jetbrains (or whatever lol)

wheat marten
#

So I should use VS Code to make a website?

sullen path
#

Use whatever you want

west raptor
#

yea

#

but

sullen path
#

but true programmers use mspaint

west raptor
#

jetbrains is made for heavier stuff i guess u could say

wheat marten
#

Oh

#

And what should I use to make software?

west raptor
#

uh

#

idk tbh

wheat marten
#

Oh

west raptor
#

lol i dont have experience with software

wheat marten
#

I used to make stuff in C#

#

C# isn't my thing though.

#

tbh I don't like C#

#

I like HTML, CSS, Java, and JavaScript

quartz kindle
#

for web development, ideally you would want something that supports sftp

#

so you can auto-upload to server on save

wheat marten
#

oh

quartz kindle
#

unless you prefer setting up a local server environment

bright spear
#

why dont you just make it deploy from git

quartz kindle
#

idk how to use git lul

bright spear
#

lol

#

most static site hosts auto-deploy from git

quartz kindle
#

but isnt git public?

wheat marten
#

I am probably going to get my domain hosted by GoDaddy

quartz kindle
#

i code mostly in php

inner jewel
#

there are private git repos

wheat marten
#

I don't host my own servers because I don't have the money to build one, and I don't have a room with temperature control

earnest phoenix
#

i need help with coding

#

pls help

#

what do i put there

wheat marten
#

You should use a script box

sick cloud
#

use a codeblock

#

@wheat marten codeblock

earnest phoenix
#

});
logger.level = 'debug';
// Initialize Discord Bot
var bot = new Discord.Client({
token: auth.token,
autorun: true

wheat marten
#

I call it a script box

sick cloud
#

its called a codeblock

wheat marten
#

js

earnest phoenix
#

the ayth.token i put my token there righht

wheat marten
#

I didn't know that

#

lua ``` local

sick cloud
#

```js
put your code here
```

wheat marten
#
put your code here
sick cloud
#

@earnest phoenix use a codeblock and tell us your aim

earnest phoenix
#

token: auth.token, (TOEK THERE RIGHT)

wheat marten
#

js const

earnest phoenix
#

ALL

#

i need

sick cloud
#

what do i put there doesnt help

earnest phoenix
#

is

wheat marten
#

STW please use a codeblock

earnest phoenix
#

where da fak do i put my token and client ID in here

wheat marten
#

jeez

sick cloud
#

what lib are you using

earnest phoenix
#

});
logger.level = 'debug';
// Initialize Discord Bot
var bot = new Discord.Client({
token: auth.token,
autorun: true
}

wheat marten
#

JS

#

most like he is using Discord.js

sick cloud
#

that isnt djs

wheat marten
#

likely

sick cloud
#

@earnest phoenix what lib is that

earnest phoenix
wheat marten
#

It seems like he is using a JS library

sick cloud
#

text document

#

@wheat marten no shit

earnest phoenix
#

done

wheat marten
#

@earnest phoenix Are you even using a text editor?

earnest phoenix
#

yes

#

fuck gtg

wheat marten
#

Do you have node.js?

sick cloud
#

i'm gonna leave you two to deal with your bad code

wheat marten
#

I don't have bad code

earnest phoenix
#

where do i put my toek in there

#

token*

wheat marten
#

const TOKEN = 'TOKEN HERE'

#

there

sick cloud
#

no

#

you have a config file apparently

#

put it in that

earnest phoenix
#

ok

#

ty bye'

wheat marten
#
bot.login(TOKEN);
#

That's what I do

sick cloud
#

then your an idiot

#

you never put tokens and api keys/info in the same file statically

wheat marten
#

why

sick cloud
#

bad practice

west raptor
#

imagine commiting ur main file

#

with ur token

#

bad news

wheat marten
#

so I should make a config.js script?

sick cloud
#

.json or .js

#

heck, even yml or whatever u want to read

wheat marten
#

I have a question about making a bot.

#

I am working on NSFW commands, Is it against discord rules to make a command that DMs somebody an NSFW image?

sick cloud
#

very so

#

since they can't set it as an NSFW channel

slim heart
#

is there a way to get a bots demographic, so like a way to look at where the servers are hosted?

quartz kindle
#

yes, you have access to server region

inner jewel
#

you mean servers as in guild or servers as in real server

slim heart
#

guild

sick cloud
#

map each guilds region

inner jewel
#

you can get the voice region for them

#

but that's it

slim heart
#

what would be the most efficient way of mapping each server and making a percentage chart yada

#

(not visual just percents)

inner jewel
#

but region only affects voice fyi

slim heart
#

I mean yeah but its a good job on the primary demographic

quartz kindle
#

yeah. but its a server-wide setting, most people use it do set server target region

#

as in, voice servers closest to target region

inner jewel
#

map each guild to it's region, then divide the count for each region by the total

#

multiply by 100 for % values

slim heart
#

bot.guilds.array().forEach(guild => {
if(guild.region == "us-east") {
oof = oof + 1
}
})
oof

#

could i just do something like that

#

but that'd be difficult to get all the regions, but im not terribly sure how

#

to make it easier

inner jewel
#

guilds.groupBy(g => g.getRegionRaw()).mapValues(list => list.size.toDouble / guilds.size() * 100)

#

just convert to js

slim heart
#

cuz i could do something like

let uscentral = 0
let useast = 0
bot.guilds.array().forEach(guild => {
if(guild.region == "us-east") {
useast = useast + 1
}
if(guild.region == "us-central") {
uscentral = uscentral + 1
}
})```
#

but thats just annoying

#

oh yeah

#

oh that's smart

steel drum
#

or

#

you could do something like this

inner jewel
#

why not just

#

const regions = {};
guilds.forEach(g => regions[g.region] = (regions[g.region] || 0) + 1);

steel drum
#

yea

#

i was gonna say that

shell blade
#

Is it possible to listen for reactions once executed with a command without using the Client method?

slim heart
#

uwu that works

#

thanks

inner jewel
night imp
#

@shell blade wdym?

#

Are you talking about listen on load?

slim heart
#

Natan what u sent worked before

shell blade
#

Yes. So that when, say, the ▶ emoji is reacted I have it go to the next page.

slim heart
#

i have quite the demographic i now know lol

#

thanks

night imp
#

@shell blade add a messagereaction listener on the message

#

(when you send the message save it as a variable)

shell blade
#
  1. .awaitReaction?
  2. I have a message handler, so I'm not sure that's possible.
night imp
#

Iirc yes

#

And you can

#

sentmessage = channel.send("help")

shell blade
#

Ah, yeah.

#

So

var msg = await message.channel.send('help');
await msg.awaitReactions(...);

This?

earnest phoenix
#

so

#

i can host my website

#

from my garbge bin?

inner jewel
#
const reactionhandlers = {};

function checkdone(messageid) {
    const handler = reactionhandlers[messageid];
    if(!handler) return;
    if(Date.now() > handler.timeoutDate) {
        delete reactionhandlers[messageid]
    } else {
        setTimeout(() => checkdone(messageid), handler.timeout);
    }
}

function listen(messageid, callback, timeout) {
    reactionhandlers[messageid] = {callback, timeout, timeoutTime: Date.now() + timeout};
    setTimeout(() => checkdone(messageid), timeout);
}

client.on("reaction", call reactionhandlers[messageid] and update timeoutDate)```
earnest phoenix
#

waw man tech is really amazing like who thought of hosting their website from their garbge bin?

#

i gotta tell my friends

shell blade
#

Ah, okay, gotcha. Thank you.

earnest phoenix
#

no problem

shell blade
#

Not you.

#

lol

earnest phoenix
#

i can host your website from my bin if you want

inner jewel
earnest phoenix
#

@shell blade i know lad i was joking brotha

#

@earnest phoenix i have a better discord logo i created for my website if you want to use it

shell blade
#

😛

earnest phoenix
#

@inner jewel i have a question this is development right so i can talking about a picture development?

#

Like what

bright spear
#

huh

#

its for bot development

#

as the channel topic says

earnest phoenix
#

ah

#

I would like to see the logo

#

@bright spear but i heard in the deep dark place its for any development

west raptor
bright spear
#

well its for mainly bot development

#

what the frick is picture development

earnest phoenix
#

in my webisite

west raptor
earnest phoenix
#

sorry

wheat marten
#

Why do sites ban boobot?

topaz fjord
#

this botlist went strictly anti-nsfw

shell blade
#

Is it possible to stop listening for an event?

earnest phoenix
#

yes

shell blade
#

How would that be done?

earnest phoenix
#

I dont know what to do

sick cloud
#

@earnest phoenix stop using a single file bot

earnest phoenix
#

So what would i define it as?

sick cloud
#

well clearly theres no guild

#

you cant define the guild

#

it might be running in a dm

#

add a check

#
if (!Message.guild) return Message.reply('There isn\'t a guild, make sure to use this in a server, and not DMs!');

something like that

earnest phoenix
#

but im trying to make it work in dms

sick cloud
#

lmfaooooo

#

did you know dms dont have channels

earnest phoenix
#

yes

sick cloud
#

and dms arent servers

#

so what are you thinking, "i can use guild in dms even tho theres no guild"

earnest phoenix
#

when someone dms the bot its supposed to create a channel in a server

sick cloud
#

guild == server
server != dm

#

then get the guild itself

#

and run the code only if its in a dm

#
if (msg.channel.type == 'dm') {
    const guild = client.guilds.get('id');
    if (!guild) return;
    // do your channel stuff
}
earnest phoenix
#

Same exact error

gleaming glen
#

how can i get the node version back to 8.x from 10.x on linux with ssh

languid dragon
gleaming glen
#

that worked

#

thank

languid dragon
#

don't thank me

#

I literally did nothing

gleaming glen
#

u copied and pasted that there

earnest phoenix
short patrol
#

konokomawu Moi wou shinden

glad charm
#

How do people make these graphs? What are they using?

astral quail
#

@glad charm it's just an image

glad charm
#

Right but they had to make it somehow.

sick cloud
#

@glad charm there are services where you pump arrays of data, etc into them

#

and it outputs an image

glad charm
#

Know any names? @sick cloud

jagged plume
#

isnt the google charts api able to provide something similar

#

plus its free

timid mantle
#

no u

glad charm
#

o?

jagged plume
#

yeah i think if you're looking for something like that google charts would work fine

glad charm
#

Thanks friends.

sick cloud
#

my old bot used plotly

stone scroll
#

how do you find a bots owner in this server?

#

cuz a bot is replying to my prefix

languid dragon
#

section

sick cloud
#

@stone scroll whats your prefix

stone scroll
#

ga!

#

why

#

@sick cloud

sick cloud
#

because you gotta expect it

#

bots use the same prefix a lot

stone scroll
#

expect what

#

ye

#

that's why I use ga!

sick cloud
#

what if the owners of mee6 got angery at every owner that used !

stone scroll
#

why would they

sick cloud
#

no prefix can be 100% unique anyways

#

only mentions

stone scroll
#

what so I can use &%&%^&$%&*

#

and thatll nbe acceptable

#

bye

sick cloud
#

ok

clever radish
#

Curious, any recommendations on how to make custom image welcome messages / profile cards (bot uses node.js)?

languid dragon
#

canvas

clever radish
#

Any particular extensions or just raw canvas?

languid dragon
#

canvas-constructor is nice

#

it's painful to setup (in my experience) but the outcome is worth it

#

some examples:

#

]]pfp

river compassBOT
languid dragon
#

]]me

river compassBOT
clever radish
#

ooh, nice

jagged plume
#

hot

clever radish
#

See what you mean by the painful setup

#

lol

knotty steeple
#

@jagged plume google charts is depreciated

jagged plume
#

it is? i had no idea lol

timid mantle
#

Thomas join chat thanks

jagged plume
#

welp thanks for letting me know lmao i might have ended up using it later

#

k

red venture
#

Hey Guys, my IDE gives me an error when trying to load a specific value from a json database via Newtonsoft. It says that the object has no definition for the search term but I don't now how to resolve it

earnest phoenix
#

How can I do a blacklist using sqlite3

#

I mean

#

In the database there are some ids.

#

And when you do forceban the bot banned all of that database

#

Someone can help me?

astral quail
#

You literally just loop all the queries.

earnest phoenix
#

@earnest phoenix gather all IDs in a column (shouldn't be too hard) then do something like this:

return;
}```
#

You will need to plugin ann values for database ID though.

#

ok

#

In that case they use a JSON as storage, however, you can easily replace it with SQL.

#

okay

#

thanks @earnest phoenix

crisp pendant
#

-bots @janitor

gilded plankBOT
#

User not found

crisp pendant
#

-bots @dusk spade

gilded plankBOT
#

Bots don't have bots, silly.

crisp pendant
#

/test

west raptor
crisp pendant
#

Ik

stoic hull
#

.NET discord bot developers:
What do you prefer: Discord.NET or DSharpPlus?
And why do you prefer one libary over the other?

serene cobalt
#

Python devs:
DPy or disco?

earnest phoenix
#

Hey there, is there a way to use markdown and html in discord bot list website?

#

or like a guide basically

#

since my description isn't long enough

harsh musk
#

it supports markdown @earnest phoenix?

earnest phoenix
#

HTML & Markdown allowed, minimum 300 characters

serene cobalt
#

@earnest phoenix At least 300 words, spaces and ect

#

Idk about a limit

harsh musk
#

spaces dont count

earnest phoenix
#

this is what I got so far
arki.py is a discord bot written in discord.py that mainly was developed for a hobby and doing random tasks like grabbing a users info or grabbing a mentioned users avatar. arki.py mainly developed by arki#8251 as a hobby. (Currently running in a raspberry pi 2 B using Python 3.6.6 for 24/7) Tip: Use $help for a list of commands.

serene cobalt
#

@harsh musk Whitespace is a character

#

ree

harsh musk
#

nope

serene cobalt
#

I will outweeb you

unique sleet
#

how do you put a bot on ONE specific category?

serene cobalt
#

Magic

earnest phoenix
#

nvm

earnest phoenix
#

Hey there @hushed berry! I fixed up all of the problems arki.py had

#

the bot got muted with "hi"

#

but its removed

unique sleet
#

can anyone help me? -.-

#

wth is gruppes?

proper wagon
#

Can the bot only show who has been most active from the time you add it, or can it show from the day, the server was made?

ruby dust
#

Discord stores a timestamp of when they joined

#

Oh wait

#

I thought you meant who joined when

quartz kindle
#

you can use fetchMessages to get messages from before your bot joined the server

#

but idk about limits

proper wagon
#

So it can't show my activities for the last half year, when I just added It today?

quartz kindle
#

it can if you make it fetch all those old messages and process them

ruby dust
#

As a quote bot developer that is made to look for past messages, there are no ratelimits of fetching messages, and the fetching speed is at least 100 messages per second

quartz kindle
#

so you can go back to the beginning of the server?

proper wagon
#

How do I do that?

quartz kindle
#

nice

proper wagon
#

Yes

quartz kindle
#

still, with 100 messages per second, it will take half an hour to get 180k messages

proper wagon
#

Can you show the command for that? 😃

ruby dust
#

Actually the speed might vary, mostly depending on your internet speed and how roughly your host is being used

quartz kindle
#

something like channel.fetchMessages({limit:999999})?

#

lmao

earnest phoenix
#

Lol

quartz kindle
#

or can you do limit 0 or -1 for infinite

ruby dust
#

But it will take a long ass time in larger servers

proper wagon
#

I got time 😄

#

If I got passion to do It

ruby dust
#

Like I know dbots is very active and is one of oldest servers I know, and even that might take at least several hours

quartz kindle
#

if its a million+ message server, it will take at least 3-4 hours

#

there are probably servers with tens of millions of messages

#

which would take hundreds of hours lmao

ruby dust
#

Even if such message fetching doesn't have ratelimits, I'm still sure that it's hard for discord to maintain performance during/after such massive fetch

quartz kindle
#

all fetched messages are cached right?

#

so millions of messages in the cache = several gigs of ram

spring ember
#

Hi! I am having a weird problem with RegExp.
I want to split at or more spaces but only match if it is is not preceded by a forward slash

#

I tried this ```regexp
"(?!/)\s+"

#

but for 1/ 2/ 3 I got 1/,2/,3

#

nvm

#

there is a actually a thing called lookbehind

#

I needed to change the code to (?<!/)\\s+

shell blade
west raptor
#

Parse the emoji and get the link

shell blade
#

How do I parse an emoji? Like get the ID?

west raptor
#

Use discord.js (assuming u use d.js) util and use the parseEmoji function and return a link to the emoji

shell blade
#

Okay.

#

The only utils that's come up are escapeMarkdown, fetchRecommendedShards and splitMessage.

#

@west raptor

west raptor
#

Util should have parseEmoji iirc

#

Hold up

shell blade
#

I'm looking at the v11.4 docs

west raptor
#

@shell blade

shell blade
#

That's weird.

west raptor
#

Might not just be on the docs

shell blade
#

I'll give it a try.

west raptor
#

Alright

shell blade
#

Okay

earnest phoenix
#

i have this server, and it has a counting text channel, one of the users suggested that i make my bot send the next number every hour

Example:

Callumok2004: 2809
MrZeke: 2810
CatManiaBot: 2811

i want it to be able to read the last number sent and send the next number which is one number higher than the previous, and to not run if the previous message was the bot
how would i go about coding this?

west raptor
#

Add one to the last message in the channel and send it in the channel

earnest phoenix
#

how would i do it though, im new to coding

west raptor
#

msg.channel.lastMessage iirc

shell blade
#

@west raptor I got the util to work, but I can't get the emoji from it?

#

Nevermind, I got it.

west raptor
#

Alright

shell blade
#

Thank you.

west raptor
#

Np

earnest phoenix
#

when it is indeeed online

knotty steeple
#

its not here

#

in the server

slim heart
#

How would one convert this

  london: 2,
  'us-central': 66,
  singapore: 9,
  sydney: 28,
  'eu-central': 58,
  'us-west': 63,
  'us-south': 34,
  'eu-west': 57,
  japan: 3,
  hongkong: 7,
  russia: 7,
  brazil: 5 }```
into percentages
quartz kindle
#

item * 100 / total

earnest phoenix
#

i want to add my bot to the server

#

lol im not a developer

#

WHY

west raptor
#

what

earnest phoenix
#

how do you become a bot developer

#

you can see that in the logs i hav posted my bot

west raptor
#

wait™

ruby dust
earnest phoenix
#

guys

#

whats the name of the thing

#

that allows you to chose colours for your embed?

astral quail
#

what lib?..

earnest phoenix
#

python

astral quail
#

Second

earnest phoenix
#

ok

astral quail
earnest phoenix
#

not that

#

i mean like

#

i had to convert the colour code to something

#

to use it

#
embed = discord.Embed(color = discord.Color.blue())
#

no

#

aaaaaaaaa

#

638064

#

this colour is green

#

like those codes

red venture
#

Does message.author result in a string?

#

Hex?

earnest phoenix
#

nope

astral quail
#

@red venture it returns the member object

red venture
#

Wait what? soo, can I somehow remove the numbers?

astral quail
#

What numbers?

red venture
#

Your ID numbers

astral quail
#

You using discord.js right?

red venture
#

Uh no, should disclose this in future. C#

#

But this should remain the same...

#

Uuh I can convert it into a string

knotty steeple
#

message.author C# Thonk

red venture
#
if (message.Content == "Peng")
            {
                var x = message.Author;
                await message.Channel.SendMessageAsync("Bleh x.x");
                await message.Channel.SendMessageAsync("Oh nein! Alpha wurde von" + x.ToString. + "erschossen!");
            }
knotty steeple
#

ok its message.Author which is completely different

earnest phoenix
#

i need da values

#

for the colours for embed

red venture
#

There is an author and Author? O.o

knotty steeple
#

no

#

@earnest phoenix wat

red venture
#

?

astral quail
#

Can you log the output of message.Author?

earnest phoenix
#

like

#

638064

#

this is green

#

bright green

red venture
#

You mean what it displays?

earnest phoenix
#

there was that website i cant remember that

#

like

#

the colour of the embed

astral quail
#

Yeah, just log it in the console

earnest phoenix
knotty steeple
#

you want to set the color for an embed

earnest phoenix
#

this

#

yea

knotty steeple
#

what lang

earnest phoenix
#

there was a converter that i had to use

#

python

knotty steeple
#

you dont need a converter

earnest phoenix
#

i already have the code

knotty steeple
#

you can get hex

earnest phoenix
#

but i need to change the colour

#

mm

astral quail
#

He needs something else then hex.

earnest phoenix
#

yea

red venture
#

@astral quail Don't think I'm dumb but how am I going to do this?

astral quail
#

I don't use #c

earnest phoenix
#

638064

astral quail
#

C#*

knotty steeple
#

discord.Embed(color=discord.Colour(urcode))

#

if i

#

remember

#

correctly

astral quail
earnest phoenix
#

um

astral quail
#

That helps?

red venture
#

Should. Forgot that the bot cmd is MY cmd xD

astral quail
#

Lul

red venture
#

But first I need to get a method to get a string that has the value equal to the message.Author's type...

#

Okay, the debug isn't working...

astral quail
#

Oh shit

#

Is there a function to make a variable a string in C#?

red venture
#

You mean like an integer to string? Yes this would work

astral quail
#

Aren't there docs for C#

red venture
#

But it seems like message.Author responds as a string because I can use my variable x without converting it....

#

Define?

astral quail
#

I'm not sure

#

Sorry

idle mountain
#

wait what's the issue? I use C#

red venture
#

Okay, figured it out. I can get the Username seperatly

#

I tried to get the username more complicated than it has to be

earnest phoenix
#

yes

#

its called

#

what ever this is

#

yay

ember shard
#

I need help with my bot

idle mountain
#

what language and what do you need help with?

ember shard
#

English, I don't know how to set up my leveling system

knotty steeple
#

programming language

ember shard
#

?

#

I'm new to this stuff

earnest phoenix
#

python, csharp , c++, js, java.

#

@ember shard what language bro

knotty steeple
#

so because you are new?

earnest phoenix
#

ay ay go easy on him bro

knotty steeple
#

everyone has to know what programming language their bot is in

ember shard
#

I am on mobile

#

My laptop died

earnest phoenix
#

calm down bro

#

good luck you cant make a bot

knotty steeple
#

dont code on mobile pls

earnest phoenix
#

XD

ember shard
#

Ok

earnest phoenix
#

only perfessional do

#

brotha

ruby dust
#

especially pros don't code on mobile

#

newbies do it more often than anyone else

ember shard
#

How do i give someone permission to edit it

red venture
#

You can't

ember shard
#

How do i code on mobile??

red venture
#

You can't either

#

It is very complicated and not intended

west raptor
#

u can

#

but its a pain in the ass

red venture
#

It is such a pain you could say can't. Just easier

ember shard
#

TELL ME HOW PLEASE

red venture
#

Get yourself an IDE

ruby dust
west raptor
red venture
#

And then figure out how to download apis

ember shard
#

What is an IDE

red venture
#

You wont get far but IF you really insist, google... maybe someone out there knows how

#

Really?..

bright spear
#

Just learn how to code pls

west raptor
#

integrated development env, @ember shard

bright spear
#

And don't code on mobile

red venture
#

At least some coding experience is needed

ember shard
#

Ok

red venture
#

Do you know how to code a bit? @ember shard

earnest phoenix
#

hmmm

ember shard
#

Yea kinda

red venture
#

Language?

ember shard
#

I am gonna use my friends computer and he uses Java

earnest phoenix
#

yeah

#

But this is about you

red venture
#

But you have to know HOW to use the language otherwise he's the dev

ember shard
#

He is the dev

west raptor
ruby dust
#

his computer isn't going to help you build a bot in java, you need to learn that yourself

west raptor
#

i cant anymore

red venture
#

Then why are you asking for coding on a mobile when HE is the dev?

#

This makes no sense...

ember shard
#

I'm not anymore

#

I am making it but Ima use his computer

red venture
#

Then you are still the dev....

ember shard
#

Now I'm confused

#

Yes

red venture
#

And you have to get a language you know

ember shard
#

I am stil the developer

red venture
#

Not just any

ember shard
#

I kinda know Java

red venture
#

Already done something? Something small like a mod or so should count imo

ember shard
#

No

#

He Tought me some

red venture
#

Ufff. what can you do?

earnest phoenix
#

so your not a dev

ember shard
#

I am

red venture
#

He means regularly

earnest phoenix
#

what can you do then

red venture
#

You already developed something?

#

Well unlikely when you don't know IDE...

ember shard
#

I’m new to this

red venture
#

So you aren't a developer

quartz kindle
#

i'd advise you to look into learning a language first, before attempting a bot

#

if you like java, look into java tutorials on the internet

red venture
#

At least make something small...

quartz kindle
#

or small courses

ember shard
#

Brb

#

Ima watch some tutorial vids

red venture
#

Good

ember shard
#

What do i do to make the "b~help" work??

quartz kindle
#
  1. learn a programming language
  2. create a bot account in the discord website
  3. create a program in your programming language
  4. add a discord library to your program
  5. use your discord bot account's token to make your program login to discord
  6. write code to listen to discord messages and reply to them
  7. execute your program
  8. add your bot to your discord server with your oauth2 invite link
  9. run your command
ember shard
#

Thanks

thin loom
#

continues to make the next best bot

earnest phoenix
#

haha

#

no

earnest phoenix
#

ok actually

#

wth is wrong with this

#

lemme pull up the error again sec

#
(node:2640) UnhandledPromiseRejectionWarning: Error: Client network socket disconnected before secure TLS connection was established
    at TLSSocket.onConnectEnd (_tls_wrap.js:1086:19)
    at Object.onceWrapper (events.js:273:13)
    at TLSSocket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(node:2640) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2640) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
events.js:173
    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
    at Client.emit (events.js:171:17)
    at WebSocketConnection.onError (C:\Users\LoseJoe\Desktop\V3\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:374:17)
    at WebSocket.onError (C:\Users\LoseJoe\Desktop\V3\node_modules\discord.js\node_modules\ws\lib\event-target.js:128:16)
    at WebSocket.emit (events.js:182:13)
    at _receiver.cleanup (C:\Users\LoseJoe\Desktop\V3\node_modules\discord.js\node_modules\ws\lib\websocket.js:211:14)
    at Receiver.cleanup (C:\Users\LoseJoe\Desktop\V3\node_modules\discord.js\node_modules\ws\lib\receiver.js:535:15)
    at WebSocket.finalize (C:\Users\LoseJoe\Desktop\V3\node_modules\discord.js\node_modules\ws\lib\websocket.js:206:20)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)```
#

I keep getting errors

#

and this is a microsoft computer

#

like from azure

#

so its 10gbps internet or some shit

earnest phoenix
#

yo

#

its me

#

uber

#

how strict is the azure firewall

wheat marten
#

I never understood what Azure was

hushed berry
#

@earnest phoenix probably depends how strict you configure it to be

earnest phoenix
#

tryna answer his question

#

lol

#

he keepds getting dropped sockets

#

so seeing if there is a firewall block on outbound (and inbound packets) that may affect it

earnest phoenix
#

Somebody can help me?
who have a code for check if my bot can send a private message to a user ( for check if the user are accepted PM for everyone)

lament meteor
#

u cant iirc

#

@earnest phoenix what lib?

#

i might be able to help u

earnest phoenix
#

wait

#

i transtalte what u say

#

im not english

lament meteor
#

i presume it is discord.js

earnest phoenix
#

yes

lament meteor
#

wat lang do u know @earnest phoenix ?

earnest phoenix
#

french

lament meteor
#

oh

earnest phoenix
#

so?

lament meteor
#

if it errors that means they hv dms blocked or blocked u

earnest phoenix
#

ye

#

codfe for check that

#

code*

lament meteor
#

so js <Message>.author.send(`hi`).catch(e => { //do stuff here if it errors })

earnest phoenix
#

oh

#

can you make something for

#

when he speak to a user who have desactive PM for everybody

#

it say in the channel where the user make the command

lament meteor
#

huh

earnest phoenix
#

"Can't send you PM active them!"

lament meteor
#

then send the msg to the channel

earnest phoenix
#

ye

lament meteor
#

//do stuff here if it errors

#

change that line to the msg

earnest phoenix
#

k

#

how?

lament meteor
#

do u not know how to send a message?

earnest phoenix
#

ye

#

wait i test something

#

fuk i have a error

#

@lament meteor