#development

1 messages · Page 977 of 1

pale vessel
spark breach
#

There is no users mentions, only roles/channels/members
Oof oki

earnest phoenix
#

@spark breach u should recheck the spelling... first()

spark breach
#

Yeah i noticed xD

dreamy breach
#

hum strange so x)

#

Oh yeah my bad

spark breach
#

oof so there is a users.mention?

pale vessel
#

yeah

#

not a function

earnest phoenix
#

just corect the spelling

#

and it will work

pale vessel
#

I spelled it wrong TvT

#

:thonk:

spark breach
#

I- yeah xd

earnest phoenix
#

lol and no wonder why we are still answering then xd

wet iron
#
at Client.emit (events.js:315:20)
at Object.module.exports [as GUILD_MEMBER_ADD] ```
#

I get this error

#

can someone help?

pale vessel
#

great you managed to hide the error

#

can we have the full error?

wet iron
#
2020-06-17T13:03:44.537349+00:00 app[worker.1]:     at Client.<anonymous> (/app/bot.js:33:45)
2020-06-17T13:03:44.537350+00:00 app[worker.1]:     at Client.emit (events.js:315:20)
2020-06-17T13:03:44.537351+00:00 app[worker.1]:     at Object.module.exports [as GUILD_MEMBER_ADD] (/app/node_modules/discord.js/src/client/websocket/handlers/GUILD_MEMBER_ADD.js:16:14)
2020-06-17T13:03:44.537351+00:00 app[worker.1]:     at WebSocketManager.handlePacket (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
2020-06-17T13:03:44.537352+00:00 app[worker.1]:     at WebSocketShard.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
2020-06-17T13:03:44.537352+00:00 app[worker.1]:     at WebSocketShard.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
2020-06-17T13:03:44.537353+00:00 app[worker.1]:     at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:125:16)
2020-06-17T13:03:44.537353+00:00 app[worker.1]:     at WebSocket.emit (events.js:315:20)
pale vessel
#

scroll up

wet iron
#

ah fric

pale vessel
#

unless it's cut off since it's heroku logs

#

then you need to wait for it to happen again

#

with logs on

wet iron
#

ok

#

my logs are on

pale vessel
#

because i don't think there's a way to get past errors in heroku

#

unless it's cut off since it's heroku logs
can you confirm this?

wet iron
#

yes

pale vessel
#

yeah, wait with the logs page

wet iron
#

its probably cut off

pale vessel
#

it is

#

you can't scroll up anymore right?

spark breach
#

because i don't think there's a way to get past errors in heroku
Don't think you can't if you've refreshed the page

pale vessel
#

yeah no

spark breach
#

Nope you can't after you've refreshed it

pale vessel
#

but you can look in /app/bot.js:33:45

spark breach
#

true

pale vessel
#

look for syntax errors or an unhandled promise

flat obsidian
#

Lopandasad

lofty fern
#

Guys anyone using python for bots

#

I have a question

slender thistle
#

looks at installed PyCharm and a few discord.py bots
Nah

#

Just ask your question tbh

lost herald
#

yes i can help maybe

lyric mountain
#

looks at installed PyCharm and a few discord.py bots
Nah
@slender thistle looks at bots asking for donation while using cracked/trial version of PyCharm

quartz kindle
#

they need donations so they can buy it :^)

slender thistle
#

ngl PyCharm is a fuckfest when formatting f-strings

autumn dust
pale vessel
#

have you tried reading the error

autumn dust
#

yep

hoary lily
#

Reading the error solves 75% of problems

lyric mountain
autumn dust
#

Oh

hoary lily
#

index.js is not found

weary ridge
#

why am i being limited to one song in only one server for ffmpeg

#
async def play(ctx, url: str):
    song_there = os.path.isfile("song.mp3")
    try:
        if song_there:
            os.remove("song.mp3")
    except PermissionError:
        await ctx.send("Wait for the current playing music end or use the 'stop' command")
        return
    await ctx.send("Getting everything ready, playing audio soon")
    print("Someone wants to play music let me get that ready for them...")
    voice = get(client.voice_clients, guild=ctx.guild)
    ydl_opts = {
        'format': 'bestaudio/best',
        'postprocessors': [{
            'key': 'FFmpegExtractAudio',
            'preferredcodec': 'mp3',
            'preferredquality': '192',
        }],
    }
    with youtube_dl.YoutubeDL(ydl_opts) as ydl:
        ydl.download([url])
    for file in os.listdir("./"):
        if file.endswith(".mp3"):
            os.rename(file, 'song.mp3')
    voice.play(discord.FFmpegPCMAudio("song.mp3"))
    voice.volume = 100
    voice.is_playing()```
lost herald
#

looks at bots asking for donation while using cracked/trial version of PyCharm
@lyric mountain theres also an actual free version of pycharm

lyric mountain
#

there isn't

lost herald
#

pycharm community edition

lofty fern
#

Ok
When I am writing a code of
@client.event Async def on_member_join(member) the things I wrote was only for the console window so if I use the same thing to show in the discord server so will it show a message whenever a person joins.

This is a little silly question but I need answers.

lyric mountain
#

ah, they released a CE version of it

lost herald
#

they did

lofty fern
#

Yes or no

lyric mountain
#

it used to be professional-only

slender thistle
#

async

#

not Async

lofty fern
#

Ok ik

hoary lily
#

caps matters haha

weary ridge
#

? anyhelp ?

slender thistle
#

Could you please elaborate on your issue, though? @lofty fern

lofty fern
#

Yes or no
I just wanna know

#

Its python

pale vessel
#

it should work the same way yes

slender thistle
#

That event will be fired whenever someone joins a server, yes

lofty fern
#

Thx

#

Which will always message so makes it a introducer like
MEE6 join log

#

Ya thx

hoary lily
#

Uhm can someone explain .sweepMessages?

#

I'm trying to understand the time args tho.

quartz kindle
#

removes messages older than the time provided

hoary lily
#

Is it in miliseconds?

quartz kindle
#

for example, sweepMessages(60) would sweep messages older 60 seconds ago and keep messages received more recently than 60 seconds ago

#

no, its in seconds

hoary lily
#

Ohhh

#

Nice explanation I learned easily! Thanks!

summer torrent
#

removes messages older than the time provided
@quartz kindle so what can this be used for

hoary lily
#

For clearing channels

#

If number is unspecified, it clears all the messages on the channel, based on what I read

quartz kindle
#

no

#

it only affects your cache

pale vessel
#

that would not be good

quartz kindle
#

it doesnt affect discord

hoary lily
#

Oh except the two weeks old messages?

#

Ohhh

#

I'm confused with cache thing

quartz kindle
#

cache = copies of discord content stored locally

#

discord.js is always storing discord data in case you need it

hoary lily
#

Like restoring messages?

quartz kindle
#

exactly

hoary lily
#

Oh I get itttt

#

pls snipe boom pow

quartz kindle
#

@summer torrent you can use it for manual cache sweeping, if you have any reason for that, for example if you want to disable automatic sweeping

hoary lily
#

Thanks again for the help!

#

I almost put that .sweepMessages in my code to literally clear a channel hahaXD

timber linden
#

Alert ("this is a alert box lol")

earnest phoenix
#

Ok boomer.

timber linden
#

🤡 BlazDab

hoary lily
#

Haha buumaajanai

timber linden
#

Using sololearn

#

To learn how to code

autumn summit
#

does anyone here know d.py

pale vessel
#

maybe

slender thistle
#

Yes

digital ibex
#

hi, with git, is there anyway i can remove all the red lines bc i deleted something and its hard to see if i still need to commit anything

autumn summit
#

ok

#

one sec

digital ibex
#

theres loads more

autumn summit
#

here is my code rnpy roleee = await ctx.guild.create_role(name=name) print(roleee)(for context, name is defined) And when I print roleee, it comes up with the role name, how do I get the ID of the role?

timber linden
#

Does anyone here know sololearn

autumn summit
#

@slender thistle

timber linden
#

Is it for websites

slender thistle
autumn summit
#

k lemme try

timber linden
#

Is sololearn for websites

hoary lily
#

read

slender thistle
#

Not jut websites

digital ibex
#

sololearn is good

hoary lily
#

I solo learn using discord.js guide bro

#

I know you can too

pale vessel
#

what do you call these js <Message id=721901924139401227 channel=<DMChannel id=700383825967972352 recipient=<User id=247741991310327810 name='shivaco' discriminator='9999' bot=False>> type=<MessageType.default: 0> author=<ClientUser id=676448082556354583 name='Guardian' discriminator='5385' bot=True verified=True mfa_enabled=True> flags=<MessageFlags value=0>>

autumn summit
#

it worked ty

slender thistle
#

That's a message object

pale vessel
#

an object?

slender thistle
#

well it is an instance of sent message

#

.send returns that so

earnest phoenix
pale vessel
#

does it have a specific name for it? i searched python objects and they don't seem to be the one

slender thistle
#

most likely would if dependencies are conflicting @earnest phoenix

#

representational string ig

pale vessel
#

thanks

slender thistle
earnest phoenix
#

aww

#

its the only thing i found for game stats

slender thistle
#

You could probably scrap the source code and modify it for yourself

earnest phoenix
#

im still learning python im not sure i could do that

hoary lily
#

I thought it's outdated haha

timber linden
#

Bruh discord guide is to much

hoary lily
#

@timber linden I started right from the start tho.

#

Until I get a grasp

timber linden
#

Tbh

earnest phoenix
#

almost as if... you need to know the language before using the library

tight bough
#

i have a question how can a make a variable that keep the content iven if the bot restart ?

earnest phoenix
#

store to a database

#

sqlite will do if you're smallscale

tight bough
#

thx

earnest phoenix
#

what database would i use if i would like to do large scale?

#

personally i'd recommend using postgres

#

postgres is used in the gaming industry

#

a lot of triple a titles use it for their servers

#

ive had issues with postgres

timber linden
#

C+++

#

Might be the language I'm going use

#

Or javascript

misty sigil
#

did you just start developing?

quartz kindle
#

c+++ isnt even a thing

misty sigil
#

if so js is probably easier

timber linden
#

Frick

#

Sololearn is prob a website coding

earnest phoenix
#

if you mean cpp, don't use a language where you have to do manual memory management lol

misty sigil
#

just use js

#

save time

timber linden
#

I'm using JavaScript

earnest phoenix
#

because you're inexperienced

quartz kindle
#

cpp/c++ is a very low level language, which requires understanding of computers to understand

misty sigil
#

c++++#

timber linden
#

Oh

earnest phoenix
#

fun fact

#

c# is basically c++++

#

aligning ++++ correspondingly makes the # sign

quartz kindle
#

javascript is a high level language that does most low level complicated stuff for you automatically

#

lmao

earnest phoenix
#

jesus christ

#

how old are you

slender thistle
timber linden
#

13

digital ibex
#

O_O

earnest phoenix
misty sigil
#

so, anyways, i want to make a bot, that sends some text, to an endpoint, but spaces ruin everything

#

i need to fix my space problem

slender thistle
#

@timber linden Mind actually stopping shitposting in #development and not using emotes that contain racial slurs

earnest phoenix
#

i'm assuming the parameter is in the url

#

if so

misty sigil
#

yes it is

earnest phoenix
#

just encode the spaces

hoary lily
#

Oof

spiral jackal
#

im bot invite plss

earnest phoenix
#

%20 is the url encoding of the space character

misty sigil
#

@spiral jackal this is dbl, wait for approval

pale vessel
#

what do you call +?

misty sigil
#

like i have been doing for 17 days now

pale vessel
#

sometimes spaces are replaced by +

earnest phoenix
#

it's also a space character but for a different content type iirc

#

i don't remember which

marble geode
#

someone can teach me how to code create role command ?? i only know how to code give role and take role command.

earnest phoenix
#

which library are you using

marble geode
#

discord.js

quartz kindle
#

lmao

digital ibex
earnest phoenix
#

what the fuck

digital ibex
#

how can i amke it not show that bc its hard to keep track of what i need to commit

earnest phoenix
#

add your node_modules folder to your .gitignore

#

lol

digital ibex
#

i did

#

i forgot to add it, i pushed everything and w/ node modules by accident

#

then added node modules to it

quartz kindle
#

you need to commit again without node modules

digital ibex
#

just do git commit -m 'removed node modules or something?

golden condor
#

Yes

digital ibex
#

okie

#

okie

#

i done tht but it still shows

golden condor
#

Try git rm

digital ibex
#

just do git rm ?

golden condor
#

I think there is a way to uncache files

#

Sev

#

Sec

#

git reset

digital ibex
#

kk

north hollow
#

gg

golden condor
#

Or if that doesn't work

digital ibex
#

what do i do now?

golden condor
#

git rm -r --cached

#

Then commit

north hollow
#

i need who have a meme api

digital ibex
#

is that right?

golden condor
#

It should be working

#

Try the commit stuff

digital ibex
#

kk

#

nope, nothing happens

hoary lily
#

git commit -am "mycommit"

mint cradle
#

Hello?

digital ibex
#

?

mint cradle
#

or is it just me

digital ibex
#

it works for me

mint cradle
#

fuck

slender thistle
#

It used to not work for me

#

It fixed itself at some some point

mint cradle
#

I'll just wait a bit

#

Thnx for advise

earnest phoenix
#

is sqlite any good?

#

i wanna use a database

pale vessel
#

yes

hasty lotus
#

guys for java, better vscode or eclipse ?

earnest phoenix
#

neither

#

intellij

hasty lotus
#

xD

#

but if you have to choose beetwin one of them, which one will it be ?

earnest phoenix
#

vsc

#

eclipse is an abolute dumpster fire

hasty lotus
#

ok we agree ^^

earnest phoenix
#

vsc is not an IDE though and can't be compared

marble geode
#

i mean how i to change the color like this !createrole #ffffff newrole

pale vessel
#

a r g s

hoary lily
#

You need args bruh

earnest phoenix
#

** a r g s**

copper cradle
#

lmao

marble geode
#

like that ?

#

i am newbie

pale vessel
#

perhaps

marble geode
#

can teach me ?

#

someone ?

hoary lily
#

Sorry I can't give you accurate answers tho.

#

But I think that'll work

pale vessel
#

try it and see

hoary lily
#

And let's see the error

marble geode
#

how to change name ?

#

use args again ?

honest perch
hoary lily
#

Yea basically args will do the trick

honest perch
#

please learn basic js

vale garden
#

hey

#
module.exports = {
  name: 'bj',
  description: "runs a game of blackjack",
  execute: (message, args) => {
    const K = 10;
    const Q = 10;
    const J = 10;
    let aa = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K];
    let bb = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K];
    let a = Math.floor(Math.random() * aa.length);
    let b = Math.floor(Math.random() * bb.length);
    
    message.channel.send("`" + message.author.username + " has " + aa[a] +  " points`\n`Bot has " + bb[b] + " points`");

    if (aa[a] > bb[b]){
      message.channel.send(`${message.author.username} wins!`)
    }
    else if (bb[b] > aa[a]){
      message.channel.send(`Bot wins!`)
    }
    else{
      message.channel.send("\nThe match is a tie!")
    }
  }
}
#

this is my code

#

im beginning to make a blackjack command

#

but when the command is executed

#

and if someone gets a king for example

#

it just says 10 and not k

#

is there a way to change this

hoary lily
#

Well you defined K = 10

vale garden
#

ik

#

im asking is there a way to still somehow display k

quartz kindle
#

you need to define conditions for that

vale garden
#

wdym

quartz kindle
#

or map display names and values separately

vale garden
#

by that

#

ok

#

how can i do that

quartz kindle
#

for example ```js
const cards = [
{
name:"1",
value:"1"
},
{
name:"2",
value:"2"
},
...
]

#

so then you can have name:"Q", value: 10

vale garden
#

oh kk

#

but the value

quartz kindle
#

or if you want to make it simpler, you can use a multidimensional array, like this cards = [[1,1],[2,2],...,["Q",10]]

vale garden
#

isnt in "" right

quartz kindle
#

yeah if you're gonna use math on it, better without quotes

vale garden
#

yeah kk

#

thnx

#

ok so i used a multidimensional array

#

but how do i

#

make it only display the string

#

soz im kinda dumb lol

earnest phoenix
#

any raw basic code of play command?
(for music bots)

restive furnace
earnest phoenix
#

tried

#

not working

#

no-one

#

..

restive furnace
#

dont copy paste

earnest phoenix
#

i know

restive furnace
#

theyre not sirectly working

earnest phoenix
#

i know

#

x2

restive furnace
#

you need to edit the code a bit

#

to make it work

earnest phoenix
#

i know x2

restive furnace
#

or simply make from scratch

earnest phoenix
#

but almost every one is broke

#

because they are old

restive furnace
#

you need to edit the code a bit, to make it work

earnest phoenix
#

3 years old..

digital ibex
#

i made my bot in html!

vale garden
#

what

restive furnace
#

@digital ibex cool

vale garden
#

is that possibl

#

lol

digital ibex
#

thank u

restive furnace
#

it basically is

vale garden
#

ok nice

restive furnace
#

using ejs probably?

digital ibex
#

no its not l0l

restive furnace
#

or angular

#

how then you made it?

digital ibex
#

i didn't

quartz kindle
#

hes trolling lol

restive furnace
#

ah, but it rly is possible

#

but complicated tho

digital ibex
#

no lol

restive furnace
#

yeah in only html, but if you use embed js or angular js, then it is

quartz kindle
#

not with pure html/css lol

#

with js it is

earnest phoenix
#

most recent one music

#

its on v12

#

.-

quartz kindle
#

you can code a browser js websocket and conect to discord

restive furnace
#

v12 is latest :D

earnest phoenix
#

@restive furnace well i can convert to v11

#

or convert my bot structure to v12

#

.-

#

i think second

#

one

restive furnace
#

theres wrappers made for making music bot's what makes it lot of easier, think using them rather than searching public music bot's source codes and copy pasting it and editing a bit.

vale garden
#

can someone tell me

#

how i can

#

display one value of each sub array in a multidimensional array

digital ibex
#

what language u using?

vale garden
#

js

#

youre asking me?

quartz kindle
#

one of each?

#

like display a list of all values?

#

or display the value of a specific item in the list?

vale garden
#

yea like one of each

quartz kindle
#

you can map the array

#

for example [[a,1],[b,2],[c,3]].map(item => item[1]) = [1,2,3]

vale garden
#

ok thx

#

a lot

#

idk if this will work

#

but

#

can i make a variable equal to [[a,1],[b,2],[c,3]]

#

and do

#

var.map(item => item[1]) = [1, 2, 3]

#

soz im kinda new to js

quartz kindle
#

yes

#

thats what map does

#

but it does not alter the original variable, you need to assign the result to a new variable

vale garden
#

ok

#

thnxx

#

im very sorry

#

for asking so many times

#

but

#
module.exports = {
  name: 'bj',
  description: "runs a game of blackjack",
  execute: (message, args) => {
    let aa = [
      ['1', 1],
      ['2', 2],
      ['3', 3],
      ['4', 4],
      ['5', 5],
      ['6', 6],
      ['7', 7],
      ['8', 8],
      ['9', 9],
      ['10', 10],
      ['J', 10],
      ['Q', 10],
      ['K', 10]
    ];
    let bb = [
      ['1', 1],
      ['2', 2],
      ['3', 3],
      ['4', 4],
      ['5', 5],
      ['6', 6],
      ['7', 7],
      ['8', 8],
      ['9', 9],
      ['10', 10],
      ['J', 10],
      ['Q', 10],
      ['K', 10]
    ];

    let aaa = aa.map(item => item[1]) = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]
    let bbb = bb.map(item => item[1]) = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]

    let a = Math.floor(Math.random() * aa.length);
    let b = Math.floor(Math.random() * bb.length);
    
    message.channel.send("`" + message.author.username + " has " + aaa[a] +  " points`\n`Bot has " + bbb[b] + " points`");

    if (aaa[a] > bbb[b]){
      message.channel.send(`${message.author.username} wins!`)
    }
    else if (bbb[b] > aaa[a]){
      message.channel.send(`Bot wins!`)
    }
    else{
      message.channel.send("\nThe match is a tie!")
    }
  }
}
#

this is my code

pale vessel
#

uh

vale garden
#

and it says this error

#
ReferenceError: Invalid left-hand side in assignment
#

ive never used arrays like this before

#

bruh i sound so dumb rn

pale vessel
#

Tim meant js const foo = [[a,1],[b,2],[c,3]].map(item => item[1]) // foo is [1,2,3]

vale garden
#

ohhh

#

im dumb yea

#

lol

acoustic kiln
#

dudes

vale garden
#
module.exports = {
  name: 'bj',
  description: "runs a game of blackjack",
  execute: (message, args) => {
    let aa = [
      ['1', 1],
      ['2', 2],
      ['3', 3],
      ['4', 4],
      ['5', 5],
      ['6', 6],
      ['7', 7],
      ['8', 8],
      ['9', 9],
      ['10', 10],
      ['J', 10],
      ['Q', 10],
      ['K', 10]
    ];
    let bb = [
      ['1', 1],
      ['2', 2],
      ['3', 3],
      ['4', 4],
      ['5', 5],
      ['6', 6],
      ['7', 7],
      ['8', 8],
      ['9', 9],
      ['10', 10],
      ['J', 10],
      ['Q', 10],
      ['K', 10]
    ];

    let aaa = aa.map(item => item["1"]) 
    let bbb = bb.map(item => item["1"]) 

    let a = Math.floor(Math.random() * aa.length);
    let b = Math.floor(Math.random() * bb.length);
    
    message.channel.send("`" + message.author.username + " has " + aaa[a] +  " points`\n`Bot has " + bbb[b] + " points`");

    if (aaa[a] > bbb[b]){
      message.channel.send(`${message.author.username} wins!`)
    }
    else if (bbb[b] > aaa[a]){
      message.channel.send(`Bot wins!`)
    }
    else{
      message.channel.send("\nThe match is a tie!")
    }
  }
}
acoustic kiln
#

got a trouble

vale garden
#

this still doesnt work

acoustic kiln
#
    name: "spawn arceus",
    category: "N/A",
    description: "spawning pokemon: arceus",
    run: async(bot, message, args) => {
        const Embed = new MessageEmbed()
        .setTitle(`A Wild Pokemon appeared type `.catch <pokemon name>` to catch it!`)
        .setColor(`RED`)
        .setFooter(``)
        .setDescription('Pocket Monster!')
        create embed const exampleEmbed = new Discord.MessageEmbed()
Set your image .setImage('https://cdn.bulbagarden.net/upload/thumb/f/fc/493Arceus.png/1200px-493Arceus.png')
Send the embed message.channel.send(exampleEmbed);
        message.channel.send(Embed)
    }
}```
pale vessel
#

remove the quotes

acoustic kiln
#

what fault

pale vessel
#

[1]

vale garden
#

if i remove the quotes

#

wont it

#

send the constants

pale vessel
#

indexes aren't strings

#

no

acoustic kiln
#

are you telling me?

vale garden
#

ok

#

ohhhh

#

i get it now

#

and it works

#

thx

acoustic kiln
#
    name: "spawn arceus",
    category: "N/A",
    description: "spawning pokemon: arceus",
    run: async(bot, message, args) => {
        const Embed = new MessageEmbed()
        .setTitle(`A Wild Pokemon appeared type `.catch <pokemon name>` to catch it!`)
        .setColor(`RED`)
        .setFooter(``)
        .setDescription('Pocket Monster!')
        create embed const exampleEmbed = new Discord.MessageEmbed()
Set your image .setImage('https://cdn.bulbagarden.net/upload/thumb/f/fc/493Arceus.png/1200px-493Arceus.png')
Send the embed message.channel.send(exampleEmbed);
        message.channel.send(Embed)
    }
}```
#

fault please

#

someone hwlp

pale vessel
#

help with what?

#

is there a problem with the code?

lyric mountain
pale vessel
#

oh lord

#

look at the bottom

#

nah RED is a constant

lyric mountain
#

oh

pale vessel
#

did you see the bottom tho

lyric mountain
pale vessel
#

very epic

lyric mountain
#

that's probably some code taken from examples

acoustic kiln
#

my frnd did

#
    name: "spawn arceus",
    category: "N/A",
    description: "spawning pokemon: arceus",
    run: async(bot, message, args) => {
        const Embed = new MessageEmbed()
        .setTitle(`A Wild Pokemon appeared type `.catch <pokemon name>` to catch it!`)
        .setColor(`RED`)
        .setFooter(``)
        .setDescription('Pocket Monster!')
        create embed const exampleEmbed = new Discord.MessageEmbed()
Set your image .setImage('https://cdn.bulbagarden.net/upload/thumb/f/fc/493Arceus.png/1200px-493Arceus.png')
Send the embed message.channel.send(exampleEmbed);
        message.channel.send(Embed)
    }
}```
coarse apex
#

@mossy vine I'm looking for a bot developer that can make bots using C#

acoustic kiln
#

so should i change red

#

am i right

pale vessel
#

go to fiverr

#

this isn't the place

acoustic kiln
#

fiverr

#

whats that

pale vessel
#

@acoustic kiln no, you should read the example and learn how to code

coarse apex
#

Is that where I can find people who do that stuff?

lyric mountain
#

some kind of freelancer hiring site

pale vessel
#

yeah

#

and don't copy paste blindly

acoustic kiln
#

@lyric mountain dude so i should change only the red command

#

and the send embed

lyric mountain
#

so should i change red
@acoustic kiln you need to read the code actually

acoustic kiln
#

@pale vessel my friend did

lyric mountain
#

there are 2 uncommented-comments there

acoustic kiln
#

he said t ask

lyric mountain
#

HE said to ask?

acoustic kiln
#

is it correct

lyric mountain
#

I have bad news then

acoustic kiln
#

so even im noob

#

yea whats that

lyric mountain
#

your friend is oficially lost

coarse apex
#

@pale vessel Another other site you can recommend?

acoustic kiln
#

why

lyric mountain
#

he copied that code from somewhere if he doesn't know the issue

acoustic kiln
#

ooo

pale vessel
#

@coarse apex search for sites where you can hire bot developers

lyric mountain
#

this doesn't exist

#

that's a comment

#

probably had // before those lines

coarse apex
#

@pale vessel Yeah, I have no idea where, so that's why I asked you if you had any other sites in mind. I would appreciate it

lyric mountain
acoustic kiln
#

okok

lyric mountain
#

idk if someone would be willing to work on a C# bot project for free tho

coarse apex
#

No one said for free

lyric mountain
#

@acoustic kiln note that you WILL need a database for storing pkmns and user data

coarse apex
#

I couldn't find anyone there making bots sadly

#

I just checked

lyric mountain
#

so I'd suggest trying something easier before

#

@coarse apex just post a request there

#

someone will answer

coarse apex
#

Alright, thanks.

acoustic kiln
#

@lyric mountain i have

marble geode
#

he copy pasted lol

stable grail
#

embed.add_field(name=f"Roles ({len(roles)}):", value=" ".join([role.mention for role in roles]))

#

it sends 2 @ infront of everyone

#

why?

slender thistle
#

Because default role's name is @everyone literally

stable grail
#

but it sends it like @@everyone

restive furnace
#

slice(1)

slender thistle
#

Yup

stable grail
#

is it normal?

slender thistle
#

role.name = @everyone
role.mention = @@everyone

#

It is normal

stable grail
#

should i change it to name instead of mention?

slender thistle
#

use a for loop with a check if role.name == "@everyone":

north hollow
#

i need help how to make a private DM for discord.js v12.2.0

restive furnace
#

@north hollow User/Member#send(content) literally.

north hollow
#

where do i put that am new to discord.js

earnest phoenix
#

knowing where to call a method is irrelevant to d.js

#

learn the language first

stable grail
#

use a for loop with a check if role.name == "@everyone":
@slender thistle what do u mean?

earnest phoenix
#

note to that

#

you can also check for the id

#

the @everyone role id is going to be equivalent to the guild id

indigo notch
#

@everyone id is same as server id

restive furnace
#

also for loop is basically basic javascript.

earnest phoenix
#

yeah

slender thistle
#

Except we're using Python

earnest phoenix
#

which is where the <@&264445053596991498> magic comes in

stable grail
#

are two @ bad?

earnest phoenix
#

what

#

it's just a mention of the @everyone role lol

slender thistle
#

Eh, it looks unusual but it doesn't cause anyone harm

restive furnace
#

oh yea im blind

slender thistle
#

... other than people with OCD, I guess?

stable grail
#

if its not bad or idk im gonna let it like this

slender thistle
#

It's not "bad"

earnest phoenix
#

it doesn't do anything

#

it's quite literally just a mention of the @everyone role

#

and it doesn't send out a ping, the actual @everyone string in a message does

stable grail
#

ok then, thanks for the help

north hollow
#

i need help how to make a private DM for discord.js v12.2.0

restive furnace
#

@north hollow User/Member#send(content) literally.
@freestyle#0001

slender thistle
#

I'm actually curious what will be more efficient:

  1. a for-loop with an if to get only the everyone role's name
  2. store role mention list in a variable and then .append/.appendleft to it thinkW
earnest phoenix
#

any idea why i cannnot install node-superfetch? (v12) : npm i node-superfetch

#
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Lavi\Desktop\Swag-Bot-master\node_modules\.staging\mathjs-31a849e1\src\function'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Lavi\Desktop\Swag-Bot-master\node_modules\.staging\googleapis-f67d078b\build\src\apis'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Lavi\Desktop\Swag-Bot-master\node_modules\.staging\googleapis-f67d078b\build'
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\Lavi\Desktop\Swag-Bot-master\node_modules\.staging\googleapis-f67d078b\build\src\apis\vault'
npm WARN swag-bot@2.2.7 No repository field.

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t git://github.com/gwicke/web-streams-polyfill.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent```
restive furnace
#

its not discord.js fault tho

#

its node.js's

#

u dont have git

north hollow
#

@restive furnace
@restive furnace where do i put that

restive furnace
misty sigil
#

i need idea

#

for commands (owner only or not idc)

#

dm me please

summer torrent
#

anyone here used datadog?

dull pawn
#

how do i remove a reaction as soon as someone reacts to it
not the whole reaction
just the one reaction from the user

radiant estuary
#

i have a problem with embeds: UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function. Pleas help me

dull pawn
#

Show what you put?

radiant estuary
#

i have a embed with some fields

#

.addField(...)

earnest phoenix
#

@radiant estuary update node

radiant estuary
#

how can i do this?

earnest phoenix
#

Where are you hosting?

#

how do you mmake a command keep going in py

#

like it keeps restarting after completing the task until i stop it

radiant estuary
#

Where are you hosting?
@earnest phoenix glitch...

marble linden
#

@radiant estuary do you have $3.50 a month?

radiant estuary
#

yes

marble linden
#

use lightsail

radiant estuary
#

i know this is not expensive

earnest phoenix
#

Lol you have to do

"node": "12.x"
}``` in your `package.json`
radiant estuary
#

ok thx

earnest phoenix
#

Add that somewhere in your package.json but place it correctly

dull pawn
#

how do i remove a reaction as soon as someone reacts to it
not the whole reaction
just the one reaction from the user

radiant estuary
#

i have this

#

and now?

restive furnace
#

now it should work

radiant estuary
#

okay thx

earnest phoenix
#

Anyone know how I would sort a mysql query, then add the output to an embed?

summer torrent
#

anyone here used datadog? my problem is I am incrementing value but it didn't show up on dashboard

slender thistle
earnest phoenix
#

oh sweet

#

thanks

midnight blaze
#

hi, am I doing something wrong here?


async function showTeachers() { 
  try {
    const stuff = await database();
    const stuff2 = await con.connect(function(err) {
        con.query("SELECT * FROM TheTeachers", function (err, result, fields) {
            con.end()
            console.log('It begins here')
            console.log(result)
            console.log('And it ends here')
            return result
        })
        
      })
    return process(stuff);
  } catch (err) { 
    console.error(err);
  }
}
#

not so good with async functions

#

"process is not a function"

#

is the result

lyric mountain
#

well, process is not a function

#

have you defined it somewhere?

earnest phoenix
#

learn js and what undefined represents

#

undefined can mean this variable doesn't have an equals sign but it is not the only meaning

#

aight imma head out

#

what is up with people acting dumb

digital ibex
#

how u learning it?

lyric mountain
#

lol, he's cleaning his comments

digital ibex
#

lmao

midnight blaze
#

well, what else should I do lol? I have asked a question and I guess people dont bother with it?

#

I will figure it out by reading some stuff about async functions..all good

lyric mountain
#

deleting the comments would make cry's comments context-less

#

which is kinda a dick move

#

but anyway

pale vessel
#

sorry pan, if only i'm on my PC mmLol

#

and i'm using mysql too

midnight blaze
#

xD np, anyway, it doesnt matter, I have found an other way to make it. I used async, but then I have changed it to old .then syntax and it worked

pale vessel
#

yeah i use the promise module, way easier

#

just await and big bang and boom

midnight blaze
#

xD big bang boom exatcly check mate

dapper compass
#

Hello,
To catch a specific error in python how can I do ?
ExtensionAlreadyLoaded: Extension 'adab' is already loaded.

I'm doing it by typing :


if type(Exception).__name__ == "ExtensionAlreadyLoaded":
  pass

But I know there is another method because I'm using in my code this line from the API docs :

if isinstance(error, commands.errors.MissingPermissions):
  pass
still merlin
#

is it possible to make a discord bot online almost all the time with a raspberry pi?

pale vessel
#

sure

#

why not?

dapper compass
#

Do this work?

try
  something
except exceptions.ExtensionAlreadyLoaded:
   pass
pale vessel
#

try it and see

lyric mountain
dapper compass
#

you are right

earnest phoenix
#

lmfao

slender thistle
#

@dapper compass isinstance(error, commands.ExtensionAlreadyLoaded) iirc

earnest phoenix
#
import asyncio
import r6sapi as api

async def run():
    auth = api.Auth("email", "password")
    
    player = await auth.get_player("billy_yoyo", api.Platforms.UPLAY)
    operator = await player.get_operator("sledge")
    print(operator.kills)

    await auth.close()
    
asyncio.get_event_loop().run_until_complete(run())
``` I found the docs for a python r6 api thing and i wanna make this into a bot command but im not sure how i would integrate it can someone help?
earnest phoenix
#

how do i do math?

#

math. ???

#

like if i typed 7*9/1

digital ibex
#

wym?

earnest phoenix
#

whats the thing that does math

#

function

digital ibex
#

what r u talking about

earnest phoenix
#

like math commands

digital ibex
#

still confused

#

what language r u using

#

that'd help

earnest phoenix
#

js

#

like some bots have math commands

midnight blaze
#

eval command?

earnest phoenix
#
const Discord = require("discord.js");

module.exports = {
    name: "uptime",
    category: "info",
    description: "Shows the bots uptime.",
    run: async (client, message, args) => {

        function duration(ms) {
            const sec = Math.floor((ms / 1000) % 60).toString()
            const min = Math.floor((ms / (1000 * 60)) % 60).toString()
            const hrs = Math.floor((ms / (1000 * 60 * 60)) % 60).toString()
            const days = Math.floor((ms / (1000 * 60 * 60 * 24)) % 60).toString()
            return `${days.padStart(1, '0')} days, ${hrs.padStart(2, '0')} hours, ${min.padStart(2, '0')} minutes, ${sec.padStart(2, '0')} seconds, `
        }
    
        message.channel.send(`I have been online for: ${duration(client.uptime)}`)     
    }
}

Why doesn't the days work?

lyric mountain
#

why toString() tho

#

btw, days wouldn't be % 60

#

but % 31 or % 30

#

and hours would be % 24

marsh elk
#

i mean it will give him a int so to a string

lyric mountain
#

but he's putting that int in a string, which will automatically convert to string

marsh elk
#

or a float

#

yh idk

#

ik what u mean

#

i see it

#

but u can do it that way but u will need to do some string concatenation

earnest phoenix
#
const Discord = require("discord.js");

module.exports = {
    name: "uptime",
    category: "info",
    description: "Shows the bots uptime.",
    run: async (client, message, args) => {

        function duration(ms) {
            const sec = Math.floor((ms / 1000) % 60)
            const min = Math.floor((ms / (1000 * 60)) % 60) 
            const hrs = Math.floor((ms / (1000 * 60 * 60)) % 24)
            const days = Math.floor((ms / (1000 * 60 * 60 * 24)) % 30)
            return `${days.padStart(1, '0')} days, ${hrs.padStart(2, '0')} hours, ${min.padStart(2, '0')} minutes, ${sec.padStart(2, '0')} seconds, `
        }
    
        message.channel.send(`I have been online for: ${duration(client.uptime)}`)     
    }
}```
lyric mountain
#

format is like concatting, but it's easier to read

earnest phoenix
#

would that work

summer torrent
#

use moment btw

lyric mountain
#

lol much easier using moment

earnest phoenix
#
import asyncio
import r6sapi as api

async def run():
    auth = api.Auth("email", "password")
    
    player = await auth.get_player("billy_yoyo", api.Platforms.UPLAY)
    operator = await player.get_operator("sledge")
    print(operator.kills)

    await auth.close()
    
asyncio.get_event_loop().run_until_complete(run())
 ```I found the docs for a python r6 api thing and i wanna make this into a bot command but im not sure how i would integrate it can someone help?
#

how do i turn a promise into a string?

digital ibex
#

what

earnest phoenix
#

I got this ```js
let math = argument.toString().replace('x','').replace('÷','/').replace('×','').replace('--','+')

var add = new Promise((resolve, reject) => {
    resolve(math)
  })```
#

why are you making it a promise

digital ibex
#

use reduce like i told u, theres no need to do that

earnest phoenix
#

if i did,

#

it doesnt

#

cause args is letters

#

not a string

pale vessel
#

lul those only replace the first occurrence

#

use regex

still merlin
#

I'm making a levelling feature with my bot and I did some research and Sequelize version 4 is a security threat, Does anyone know how I would use version 5? would I just add version: '5' to my dbInit file?

pale vessel
#

but that's another problem i guees

earnest phoenix
#

idk how to use regex

quartz kindle
#

@still merlin in order to update major versions, you need to uninstall it and reinstall it

still merlin
#

I dont have it installed rn I need to install it now (Doing reserch)

quartz kindle
#

the current version on npm is 5.21.13 but if you have version 4.x.x installed, it wont let you update to 5.x.x because major versions usually contain breaking changes that would break your code if updated

limber flume
#
em.add_field(name="**Status**", value=user.status)

Is there a possible way if they online i could put green emoji and idle = orange and so on...

still merlin
quartz kindle
#

caps

earnest phoenix
#

dont have the caps

#

npm i sequelize

#

h!

#

yes

#

make a dir FFmpeg and inside folder avconv

#

and download this

#

@low orbit

#

it should work

#

yes

#

go down

#

and press download build

#

ye

#

please i want game for my bot (discord.py) Give my idea

#

make a high end AAA title

#

in discord

#

Thank ^^ another idea

#

?

vagrant cedar
#

how can i host a bot for free?
i used discordjs & Discord Bot Maker to make the bot

earnest phoenix
#

you have the file ?

limber flume
#
todict = {
        "online": "🟢",
        "dnd": "🔴",
        "idle": "🟡"
        }
em.add_field(name="**Status**", value=todict[user.status])
#

can someone help and tell me why this isnt showing any error and not working.

vagrant cedar
#

you have the file ?
@earnest phoenix are you talking to me?

#

or

slender thistle
#

Because user.status isn't a string

earnest phoenix
#

yes @vagrant cedar

slender thistle
#

It returns discord.Status.x where x is the status

vagrant cedar
#

yes i have, but if it does not work for free, is it possible to run the bot on a webserver @earnest phoenix

slender thistle
#

aka discord.Status.online, discord.Status.idle, etc.

earnest phoenix
#

MMMMMmmmhhhh.... No my have pc for run bot go to dm @vagrant cedar

digital ibex
#

huh

spiral jackal
#

im bot verified pls <@&304313580025544704>

slender thistle
#

-atmods

gilded plankBOT
#

Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.

Here are some examples of emergencies:

  • Raids / Multiple members mass spamming.
  • Severe disruption of Discord's ToS (NSFW content, etc)
  • Anything that requires more than 2 moderators to handle.
slender thistle
#

-faq 2

gilded plankBOT
spiral jackal
#

ah sorry

summer torrent
#

lol

craggy pine
#

-upto

gilded plankBOT
#

The FAQ clearly states that it will take UP TO 1 week or more.
This does not mean it will take a week and does not mean it will take less than a week.
There is no set time for how long bot approval will take.
There is a queue and you're not first, nor are you last.

digital ibex
slender thistle
#

It will be reviewed once it's your bot's turn in the queue

still merlin
#

er, can someone help '-'


PS C:\Users\Jon\Desktop\SpiderBot Project> node .
C:\Users\Jon\Desktop\SpiderBot Project\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:88
        throw new Error(`Please install ${moduleName} package manually`);
        ^

Error: Please install sqlite3 package manually
    at ConnectionManager._loadDialectModule (C:\Users\Jon\Desktop\SpiderBot Project\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:88:15)
    at new ConnectionManager (C:\Users\Jon\Desktop\SpiderBot Project\node_modules\sequelize\lib\dialects\sqlite\connection-manager.js:22:21)
    at new SqliteDialect (C:\Users\Jon\Desktop\SpiderBot Project\node_modules\sequelize\lib\dialects\sqlite\index.js:14:30)
    at new Sequelize (C:\Users\Jon\Desktop\SpiderBot Project\node_modules\sequelize\lib\sequelize.js:324:20)
    at Object.<anonymous> (C:\Users\Jon\Desktop\SpiderBot Project\dbObjects.js:3:19)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.Module._load (internal/modules/cjs/loader.js:891:14)
    at Module.require (internal/modules/cjs/loader.js:1023:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (C:\Users\Jon\Desktop\SpiderBot Project\index.js:15:33)
    at Module._compile (internal/modules/cjs/loader.js:1128:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:983:32)
    at Function.Module._load (internal/modules/cjs/loader.js:891:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
PS C:\Users\Jon\Desktop\SpiderBot Project> ```
digital ibex
#

"Error: Please install sqlite3 package manually"

still merlin
#

I saw that. how do I do that thought

digital ibex
#

you need to manually install sqlite3

still merlin
#

I cant find the website ;-;

earnest phoenix
#

@limber flume use this:

    const status = {
    "dnd": "YOUR EMOJI",
    "online": "YOUR EMOJI",
    "idle": "YOUR EMOJI",
    "offline": "YOUR EMOJI"
  }
and
${status[user.presence.status]}```
#

this should work

slender thistle
#

why

#

Literally the only reason I started mumbling about discord.Status

earnest phoenix
#

ex for last part:

embed.addField("User", `${status[user.presence.status]} ${user.username}#${user.discriminator} (\`\`${user.id}\`\`)`)```
#

@slender thistle i wrote for sean wich use discord.js

slender thistle
#

so

earnest phoenix
#

converting

slender thistle
#

Many cases of people literally just C+P here so I wouldn't rely on it too much...

digital ibex
#

@still merlin i literally googled the erorr and the first result shows u what to do

earnest phoenix
#

..

wide ruin
#

Does anyone here know an easy way to leave my computer to train on a set of images?

#

I tried hyperGAN but couldn't get it to work

#

Anyone know a quick one to set up?

calm linden
#

Can someone help me made a purge command ?

wise quartz
#

How to get traceback from a task? (Python: GWcodesPython)

#

@calm linden theres tons of youtube tutorials for that topic m8

solid mesa
#

Hello good support I want to ask if I can make a level system but with a command called e.profile and that says the experience but without any message

digital ibex
#

or you can make it yourself

#

@solid mesa show sum code

solid mesa
#

I don't have the code yet, I just wanted to know if I could

gritty marten
#

Yes, it’s possible, you can create anything.

earnest phoenix
#

says the experience without any message
awhat

#

how else is the user supposed to read your content

#

Can I make a word counter?

#

why not

glad charm
#

If you want to.

urban olive
#

hello

#

anyone mind helping me out?

glad charm
#

What's up?

urban olive
#

trying to get my bot to join VC and play music

#

whenever i tell it to join it says im not in a voice channel

#

even though i am

#

hold on letme get the code

digital ibex
#

how can i get the users badges? all i've got is a number. how can check what it is

summer torrent
#

libraries supports that

digital ibex
#

wym?

summer torrent
urban olive
#

you need have your bot in 100 servers

digital ibex
#

the library gives a number

#

eris

#

it returns a number, like mesage.author.publicFlags

summer torrent
#

wait a sec

urban olive
#

lol

#

we dont care about your clan

#

stop flooding with server invites

summer torrent
digital ibex
#

im not using d.js

#

wym

#

confusion lol

earnest phoenix
#

use bitwise operations

#

the number returned is a bitmask

digital ibex
#

oh right

#

okie thanks :)

urban olive
#

hm

#

ok

#

this is my play command

#

whenever i am in a VC and i call it to join it wont join because according to the bot i am not in a VC

trim saddle
#

message.author?

#

is message.member a thing

urban olive
#

do i have to change message.member to message.author

trim saddle
#

i'm pretty sure

urban olive
#

k ima try it

gritty marten
#

@solid mesa If you mean to send the experience profile without executing the message it can be done, by having it as a timed message or by using a database and executing it somewhere else like from a dashboard.

empty owl
#

Im pretty stuck on something. I requested some values from an api, and it returned a really long string filled with random values.

I did some searching and its a a base64 gzip encoded string.
Is there an easy way to decompress and decode it? or a package?
im currently writing a package so I dont really want to add another depenency
javascript

urban olive
#

nope it dont work

#

it wont detect me when i am in a voice channel

#

it says i need to join a voice channel even though i was in one as of typing the command

gritty marten
#

@urban olive what library version are you using?

urban olive
#

discord.js

gritty marten
#

What version, 11 or 12?

urban olive
#

hm

#

one sec...

regal briar
#

@empty owl b64 is easily encodable and decodable

urban olive
#

where do i check?

regal briar
#

its a two-way function

#

so unlike hashes, you can decode it easily

gritty marten
#

Check your package.json

digital ibex
#

just do require('discord.js').version

#

or ^^

gritty marten
#

If it’s the latest then 12

empty owl
#

@regal briar using plain javascript or a package?

regal briar
#

not sure im a python guy sry

empty owl
#

ah

urban olive
#

it says 12.2

empty owl
#

thanks fo rhte help tho

regal briar
#
gritty marten
#

Try ‘message.member.voice.channel’

regal briar
#

take a look at that @empty owl

empty owl
#

thanks

urban olive
#

instead of what?

gritty marten
#

Instead of voiceChannel

urban olive
#

k

#

@gritty marten it crashes everything when the command is used

gritty marten
#

Send a screenshot

urban olive
#

hm

#

one sec

#

wait

#

do i have to put the 's

gritty marten
#

I meant to replace only voiceChannel with voice.channel

urban olive
#

hm

#

ill try that

#

it joined

gritty marten
#

Yeah, that’s good

urban olive
#

it doesnt play the song tho

gritty marten
#

That has to do with your other code

urban olive
#

the error message says connection.playStream is not a function

slim hollow
#

my bot reinstalling pacpages every 15 minutes, can u help me?

honest perch
#

Its a known issue

#

With glitch

#

Check their forums

slim hollow
#

is there a solution?

honest perch
#

No

#

Except from getting an actual host

slim hollow
#

what should i do now?

#

oh no

honest perch
#

Nothing you can really do as its glitchs problem

#

I recommend getting a vps

gritty marten
#

@urban olive try only play instead of playStream

slim hollow
#

will they find solution?

urban olive
#

ok

slim hollow
#

or just glitch is dead

urban olive
#

wait

honest perch
#

Probably but it will take time

urban olive
#

it worked

#

it worked

#

ive never been so happy to hear the DK rap

honest perch
#

And glitch is pretty much slowly dying with the amount of problems they're having

gritty marten
#

Lmao

slim hollow
#

😦

urban olive
#

now to make the bot only play the dk rap

slim hollow
#

thank you for information misly!

empty owl
#

does anyone know how to decompress a gzip in javascript

honest perch
#

Tbh its to be expected as its free

empty owl
#

its better if its pure javascript so I dont have to add a depencency

honest perch
#

And they're getting over loaded

slim hollow
#

35$? :d

#

i don't have 240 turkish lira

#

its too much

empty owl
#

or aws

#

aws is free

#

i think you can host a bot on there for free

#

never tried

#

idk havent tried

#

theres a lot of databases

#

i use a sqlite wrapper

honest perch
#

I use mongo

digital ibex
#

hi, i have js if (args.length > !1) return; member = await client.getRESTUser(args[0]).then((e) => console.log(e)); why is it erroring when i have that if statement?

#

its erroring at the args[0] bit, but im checking if theres arguments provided then do do whatever

woven sundial
#

Stupid question ik but is client.uptime the uptime of the token that is given by discord.
Or
The uptime of the instance?

earnest phoenix
#

uptime of the node instance

#

i just changed my servers for my bots they are so smooth now from 148 ping to 100-110 oliy

woven sundial
#

Okay ty @earnest phoenix

earnest phoenix
#

i don't have 240 turkish lira
@slim hollow Türkiye'de durum böyle maalesef zgn

slim hollow
#

😦

digital ibex
#

thats checking if theres no args?

#

im checking if there r

earnest phoenix
#

if(args[0] != undefined)

#

that runs if the first argument is defined

#

you can check if there are none by doing if(!args[0]) return message.channel.send("some kind of error message to indicate u need args");

earnest phoenix
#

How do I make a word counter like whenever someone says pog it counts it and we can do !pog to see how many times it has been said

quartz kindle
#

you need a database to store it

earnest phoenix
sudden geyser
#

what do you mean

valid frigate
#

how would i start creating commands in separate files in rust

#

its been bugging me a bit since im not sure where to start since rust is funny mmWeird

river slate
#

anyone wanna help me with this? Trying to get my bot to tell the user when it doesnt have the correct permissions. (discord.py)

#
@client.command()
@commands.bot_has_permissions(ban_members=True)
@commands.has_permissions(ban_members=True)
async def ban(ctx, member : discord.Member, *, reason=None):
    logchannel = client.get_channel(720467913144008798)
    await member.ban(reason=reason)
    msg = (":hammer: Successfully banned ``{}``. Reason: ``{}``".format(member, reason))
    await ctx.send(msg)
    logmsg = (":hammer: `{0}` banned `{1}` from `{2}` in `{3}` for `{4}`".format(ctx.author, member, ctx.guild, ctx.channel, reason))
    await logchannel.send(logmsg)

@ban.error
async def on_command_error(ctx, error):
    if isinstance(error, commands.BotMissingPermissions):
        await ctx.send("check")```
#

I dont know how to use the BotMissingPermissions error handler

#

^this doesnt work btw

earnest phoenix
#

Okay so the perfix Can you make it to where it not cap sensitive?
Instead of a lowercase Command Perfix to run the command, you can use both Capital B and lowercase b

river slate
#

what library

#

@earnest phoenix

earnest phoenix
#

? What do you mean by that

river slate
#

what library and language are you using

earnest phoenix
#

Eh let me check

#

.-.

river slate
#

how do you not-

#

know

earnest phoenix
#

wtf xddd

river slate
#

what language you're coding in

earnest phoenix
#

C

river slate
#

ok, what library

earnest phoenix
#

C?

river slate
#

who is supporting what you're writing with the api

#

like

earnest phoenix
#

Discord.js

river slate
#

how tf

#

are you writing in C

#

and using discord.js

#

are you coding this bot?

earnest phoenix
#

Yeah

#

I think I got it

#

Is .tolowerCase()

river slate
#

yeah but... how are you

#

nevermind

#

natural selection ig

earnest phoenix
#

Lmao

#

Oh yeah you needed help for that premission decline thingy @river slate

river slate
#

you dont even know what language you're writing in. please do not respond to my question.

earnest phoenix
#

I-

#

At least I tried

sick cloud
shy turret
#
client.users.fetch("DISCORD ID").send("msg")

is this how you send a msg by id?

sick cloud
#

if your bot shares a server it'll have a chance of working

shy turret
#

kk

#

If you open up a DBL webhook, is it possible to run more pages?

#

like /index.html

urban olive
#

fricc

#

i just noticed

#

i left the key for my bot here

#

whoops

#

now its gone

valid frigate
#

what is the correct way to implement both commandlist and eventhandler into handler?

#

well assuming this is necessary

#

basically i just want the vector of commands to be available to the message function in serenity's event handler

#

@west raptor cc

west raptor
#

well I mean that works I guess unles there are other issues arising, command_list might wanna take self though

#

why not just use serenity's command handler though?

valid frigate
#

ah well im just dumb

#

also what do you mean by taking self, like it doesnt need a type annotation?

lyric mountain
#

Use the message event

#

Check for channels ID, if it matches add a reaction to it

#

Note that it's probably doing something else instead of just "reacting to"

#

Like making a pseudo-button with that reaction

marble geode
#

this is my code ```exports.run = (client, message, args) => {
if(!message.author.id.hasPermission("MANAGE_ROLES") return message.reply('You Dont Have PErmission To Create Role !')
if (!message.guild.me.hasPermission("MANAGE_ROLES") return message.channel.send("I Dont Have Permission To Create Role !")

let name = args[0]
if(!name)
  return message.channel.send('Please Input a name for create role')

let color = args[1]
if(!color)
return message.channel.send('Please Input a hex code to role color')

 var args = message.content.split(" ");

args.shift();
let role = message.guild.roles.create({
data: {
name: name,
color: color
}
)}
await message.channel.send(${role.name} role was created);

}
exports.help = {
name: "createrole",
description: "",
usage: "",
example: "",
};

exports.conf = {
aliases: [""],
cooldown: 5
};that is work but after role created the message isundenefied has been created```

#

someone can help ?

zinc condor
#

trying to make bot which supports leaderboards but no idea how to store it in database

#

every message is kept with a timestamp

#

and it shows like "Weekly top actives"

summer torrent
#

@marble geode roles.create() is Promise

marble geode
#

can gimme link to docs?

zinc condor
#

bruh just put await in front of it

marble geode
#

where ?

zinc condor
#

in front of message.guild.roles.create

marble geode
#

gimme example

summer torrent
#

let role = await ...

zinc condor
#

you should go back to js basics :l

#

js is entirely async and promises run on seperate threads, await waits for the function to return, otherwise it just continues even with the value being undefined

marble geode
#

same lol

#

i change it and test that is same

#

undefined

obtuse stone
#

Do I trigger use when I say I downloaded most of my code?

#

😂

lyric mountain
#

What's a pseudo button?
@earnest phoenix a pseudo-button is a button that's not exactly a button

#

For example, many bots use pagination to navigate through "pages" of embeds

#

This is done through reaction tracking, so it's not exactly a button

#

But works like a button

marble geode
#

Z

#

gimme answer for my question

zinc condor
#

i heard somewhere that discord was improving embeds with buttons and stuff

lyric mountain
#

Yep, actual menus are coming to bots in the next big update

#

Including right button menus

obtuse stone
#

Oh that will be cool

zinc condor
#

trying to make bot which supports leaderboards but no idea how to store it in database
every message is kept with a timestamp
and it shows like "Weekly top actives"
how tf do i actually organize the database like this
every single message needs to be kept or atleast a memo of its existance
then sort all messages by user

#

weekly and monthy

#

was thinking of keeping a time in db along with userID but how would i combine them all into a number and sort it

#

i would need to check everything in the collection

lyric mountain
#

Store message count instead

zinc condor
#

that wouldnt work weekly and monthly

lyric mountain
#

On each message, increase the count

zinc condor
#

:l

#

what about if i want messages within a timeframe

#

like weekly, monthly, forever

lyric mountain
#

Well, then you're complicating a bit

#

Rule of thumb is not to store messages older than 3 months

#

This way you'll suffer less from database size

zinc condor
#

yeah ill probably clear once it gets to that point

#

I guess i could get every document which is after a certain date

#

then i can narrow it down and sort it

earnest phoenix
#
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       NODE_VERBOSE=false
       
-----> Installing binaries
       engines.node (package.json):  12.x
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version 12.x...
       Downloading and installing node 12.18.1...
       Using default npm version: 6.14.5
       
-----> Restoring cache
       - node_modules is checked into source control and cannot be cached
       
-----> Installing dependencies
       Prebuild detected (node_modules already exists)
       Rebuilding any native modules
       
> canvas@2.6.1 install /tmp/build_549b84710d3da3dc2223fb72560f06ad/node_modules/canvas
> node-pre-gyp install --fallback-to-build
       
       sh: 1: node-pre-gyp: Permission denied
       npm ERR! code ELIFECYCLE
       npm ERR! errno 126
       npm ERR! canvas@2.6.1 install: `node-pre-gyp install --fallback-to-build`
       npm ERR! Exit status 126
       npm ERR! 
       npm ERR! Failed at the canvas@2.6.1 install script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
       
       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.Ql5wB/_logs/2020-06-18T01_25_23_142Z-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       Some possible problems:
       
       - node_modules checked into source control
         https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed```
#

help

zinc condor
#

using mongo so it might have some aggregation

lyric mountain
#

What you could do is, on first message sent every day by each user create a new "day" entry for that user