#development

1 messages · Page 449 of 1

earnest phoenix
#

But no

south finch
#

you can spoonfeed and get muted STteaSip

sick cloud
#

Yeah, it's best to stop thonk

earnest phoenix
#

i aint brokin rules

split lantern
#

\🥄

sick cloud
#

@split lantern, worked fine for me. not like I used it or anything

earnest phoenix
sick cloud
#

You were @split lantern.

#

owo

split lantern
#

?

sick cloud
#

I meant @earnest phoenix, sorry.

earnest phoenix
#

What

split lantern
#

When striketrough discord emojis

#

\💩\💩

earnest phoenix
blazing gorge
#

What the fuck is happening 😂

#

Lol

earnest phoenix
#

Read it

blazing gorge
#

I just want to make a bot

earnest phoenix
#

Well you can make a bot by reading that

blazing gorge
#

Read what anidiots?

#

Lmao

sick cloud
#

I've given you links to 2 great guides @blazing gorge, read them and learn for yourself.

blazing gorge
#

Why does everyone like to tag me!

earnest phoenix
#

Facepalm i guess if you want ppl to spoonfeed you then no1 will

blazing gorge
#

Ahsvwb so

#

Spoonfeed

split lantern
#

Spoonfeeding= taking code and putting it in ya butt mouth

blazing gorge
#

Oh

#

Hell no

split lantern
sick cloud
earnest phoenix
#

Wow

blazing gorge
#

What do I pick lol

split lantern
#

Read all of them

blazing gorge
#

😂

#

Jk

#

Oh

sick cloud
#

learn

split lantern
#

No joke

earnest phoenix
#

Learn and ur bot dream will come true

blazing gorge
#

Boi

#

How did u make ur bot electro

split lantern
#

I preffer Girl

blazing gorge
#

And plasma

#

?

split lantern
#

Node js

blazing gorge
#

Oh

earnest phoenix
blazing gorge
#

Omg

#

Stap

#

Tagging

#

Me

#

Im

#

Right here

#

-_-

split lantern
#

But i learnt C++basics in college

blazing gorge
#

And I'm already in that website

#

Cool

split lantern
#

So the 2 Guides were easy to do trough

blazing gorge
#

And they are

#

Meh

quick ivy
#

Can anyone help me figure out why this isn't working?

#

if(command === "!politics") {
//role id - 427982289708777474
//if(message.member.roles.has(427982289708777474)) {
if(message.member.roles.has("polititalk") ) {
message.channel.send("Dude. You already have that role. :blobthinkingsmirk: Is this a prank?");
} else {
let role = message.guild.roles.find("name", "polititalk");
message.member.addRole(role).catch(console.error);
message.channel.send("You should now have #politics access now. Please remember the Sanity Rule! :blobcorn:");
}}

#

I already had politics access.

blazing gorge
#

....

#

How did u make da bot(coding lol)?

quick ivy
#

node.js/discord.js

#

I run it on a windows machine in a powershell terminal, if that helps.

blazing gorge
#

Idk

#

Ok

#

Cool

quick ivy
#

thonkku So, any ideas?

blazing gorge
#

For?

quick ivy
#

... How to fix it?

blazing gorge
#

IDK

#

I'm new to making bots

#

Lol

quick ivy
#

Aha.

blazing gorge
#

IDK how to make one tho ☹️

#

Computer crashed

pale marsh
#

@quick ivy check the role name instead maybe? Idk what language this is

quick ivy
#

javascript/node.js

#

It works for at least assigning the role, but the 'check if has role / if does say that' doesn't work.

sick cloud
#

@quick ivy
1: use codeblocks
2: roles are mapped by id, not name iirc

#

so use the role id instead of the role name in the check

quick ivy
#

Okay, I'll try that.

knotty steeple
#

also id has to be string

quick ivy
#

Hm?

knotty steeple
#

looking from the code its an integer/number

#

message.member.roles.has(427982289708777474)

pale marsh
#

Maybe there's something similar to if(message.member.roles.find("name", "polititalk") != null) or something

knotty steeple
#

this ^

#

there is something like that @pale marsh

pale marsh
#

Idk js lol

#

I come from a C# background

knotty steeple
#

you dont use that "name", "polititalk" thing

pale marsh
#

He used it to find the role object though 🤔

knotty steeple
#

you gotta do something like r => r.name === "polititalk"

quick ivy
#

Okay, I'll play with it, and report back.

#

Thanks!

blazing gorge
#

...

pale marsh
#

Node jd has linq?

knotty steeple
#

linq?

pale marsh
#

Never mind

knotty steeple
#

ok then :p

pale marsh
#

That's not linq lol

knotty steeple
#

what is linq

pale marsh
#

Idek why I thought this was linq

#

Linq is something in C#

#

Uh

#

Google it lol

earnest phoenix
#

I use r => r.name === 'wahtever name it is'

knotty steeple
#

that is basically what i sent

earnest phoenix
#

But totallie didnt copy psted

#

Gtg

pale marsh
#

Cya

warm prairie
#

Anyone know if there is a way to subscribe to the WebSocket connection discord.js uses ?

stiff juniper
#

what for

warm prairie
#

web client

#

running on the same container

sick cloud
#

Anyone know a good free lyrics API? I can't find any good ones.

latent heron
#

Check youtube api

#

It may have it

knotty steeple
#

Musixmatch API

sick cloud
#

YouTube API doesn't, and I don't really want to use Musixmatch since it doesn't meet my requirements at all.

naive summit
#

what do you need?

sick cloud
#

Like, full lyrics. Musixmatch only gives 30%

earnest phoenix
sick cloud
#

will check it out

naive summit
#

seems easy enough to find apis

frosty sleet
#

does anyone use .Net library of DBL? press tickYes

earnest phoenix
#

hey, when i try to change my bot's avatar, the picture becomes very low quality

sick cloud
#

profile pictures are automatically resized to 512x512 @earnest phoenix, that's why probably

earnest phoenix
#

nah it like makes it

#

really smll

#

64x64

#

its also compressed by discord

weak parrot
#

I use .Net but I always just manually post to DBL since I use the same method to post stats accross 3 different bot lists

frosty sleet
#

I have contributed .net lib, even though I use only 2 get requests I type manually bloblul

austere sedge
#

pls help

#

I have a problem... The event works but the commands doesnt work

#

@quasi marsh

quasi marsh
#

Do you have an on_message event?

austere sedge
#

yes

quasi marsh
#

If so you need to do some thing like await bot.process_commands(message)

austere sedge
#

ty

jolly mist
#

why bot does not see the team?

const botconfig = require("./botconfig.json");
const tokenfile = require("./token.json");
const Discord = require("discord.js");
const bot = new Discord.Client({disableEveryone: true});
bot.commands = new Discord.Collection();

bot.on("ready", async () => {
    console.log(`${bot.user.username} is online`);  
    bot.user.setActivity("", {type: "WATCHING"});   //Смотрит {},
    //bot.user.setGame("Cломать тебе ебало.exe");   //Играет в {}.
});

bot.on("message", async message => {
    if(message.author.bot) return;
    if(message.channel.type === "dm") return;

    let prefix = botconfig.prefix;
    let messageArray = message.content.split(" ");
    let cmd = messageArray[0];
    let args = messageArray.slice(1);

    let commandfile = bot.commands.get(cmd.slice(prefix.length));
    if(commandfile) commandfile.run(bot,message,args);

    //command: say
    if (cmd === `${prefix}say`) {
        message.channel.send("test")
        message.delete().catch(O_o=>{});
    }
    //command: 
});

bot.login(tokenfile.token);
split lantern
#

Team?

jolly mist
#

yeah!

pale marsh
#

So I’m a pleb who just heard of Google Analytics. Anyone got an example of stats they’re keeping track of?

split lantern
pale marsh
#

Well yeah I know. I just wanna see how it can be used. Or rather just see the result, if you know what I mean

untold dome
#

does the /weekend endpoint have a rate limit

#

?

bitter sundial
#

in what node version was for await of support added

austere meadow
#

the proposal was accepted late last year iirc
so i'd imagine either node 9.6 or 10+

#

i also know that it came out with chrome 63

#

haven't been able to pinpoint a specific version though

copper cradle
#

@pale marsh added might be able to help yah out mate 😃

pale marsh
#

@copper cradle added what?

earnest phoenix
#

Hi

#

is it possible to send different welcome message for different countries

#

if new member is chinese, the message will be chinese

#

or if member is brazil, message will be portuguese

#

for discord.js

knotty steeple
#

well not really

#

without the user already being in some database saying they speak chinese or some other language

earnest phoenix
#

or nvm

knotty steeple
warm prairie
#

Would be nice ... discord does have the option to change languages

earnest phoenix
#

But a player joined my server

knotty steeple
#

but is there a way to find what language they have their discord set as?

earnest phoenix
#

And the verify message was English but player is brazilian

knotty steeple
#

no i dont think so

earnest phoenix
#

so he didn't understand anything

warm prairie
#

I mean you could have channels specifically for each language you expect to join and just send a welcome message to each of them in different languges

earnest phoenix
#

That would be a channel mess

warm prairie
#

yep

#

discord.js docs don't have anything for this though ...

earnest phoenix
#

ikr

#

i really need something like that

#

i can find users ip

warm prairie
#

is your welcome message specific to something on your server?

earnest phoenix
#

Yes, users need to verify them.

warm prairie
#

oh

earnest phoenix
#

I'm developing a game's communities and they need to change their nicknames to our format

knotty steeple
#

@earnest phoenix yea dont do that

#

find users ip

#

no no

warm prairie
#

lol

knotty steeple
#

im serious

earnest phoenix
#

Why?

warm prairie
#

Privacy Violation

earnest phoenix
#

if the ip starts with xx the message will be xx

knotty steeple
#

still a privacy violation if your fetching the user's ip

earnest phoenix
#

I will not see anyone's ip

#

or

#

lets check can i see their discord language

#

yes i can see their OS lang lol

warm prairie
#

Really?

earnest phoenix
#

I don't think its for discord.js

#

but will try anyway

#

holy crap

#

i didnt get language

#

but got the files ftw

#

should i send what i got?

knotty steeple
#

everything you say is a privacy violation

earnest phoenix
#

no

#

i didnt mean that

#

i got npm path

knotty steeple
#

ok lol

earnest phoenix
#

wait

#

omfg

#

i got everything of my computer

#

awkward

upper ember
#
const express = require('express')
const discord = require('discord.js')
const app = express()
const client = new discord.Client();

app.get('/', function (req, res) {
    console.log("Someone entered /")
    res.send("WAVE!!!")
}); 

app.get('/chat', function (req, res) {
    client.on('msg', msg => {
        res.send(msg)
    })
})


client.login("TOKEN COMES HERE")
app.listen(3000, function () {
    console.log('WebDiscordChat beta 0.1 listening on port 3000!');
  });
#

a little help pls

warm prairie
#

?

#

Whats the issue?

upper ember
#

it doesn't work joi

warm prairie
#

error messages?

knotty steeple
#

discord.js and express Thonk

ruby dust
#

in python, does a variable needs to be global in order for an external file to access it? or at least being able to import it?

knotty steeple
#

@upper ember its 'message'

#

not 'msg'

#

as the event

warm prairie
#

I've been doing that too @knotty steeple

knotty steeple
#

doing what

warm prairie
#

discord & express

earnest phoenix
#

wth

#

discord and express?

warm prairie
earnest phoenix
#

its java

warm prairie
#

what's java?

earnest phoenix
knotty steeple
#

its not java

#

its typescript

fluid basin
#

Lul

warm prairie
#

says Discord.js right in the descrip? lol

night imp
#

That isn't java and it says typescript

fluid basin
#

typescript is like what

night imp
#

Modified javascript

knotty steeple
#

typescript is bad

fluid basin
#

yh

earnest phoenix
#

i tho its java

#

i tested that language

warm prairie
#

typescript is awesome

earnest phoenix
#

public import etc. is same with ts

knotty steeple
#

yea true

#

javascript !== java also

warm prairie
#

^

earnest phoenix
#

ik

knotty steeple
#

ok gud

patent tinsel
#

typescript is that weird uncle you never asked for who you think you know but then you find out one more thing that asks more questions then it answers then you're back at square one again, who the fuck is my uncle?

earnest phoenix
#

wot

patent tinsel
#

by the way i've never used typescript

quartz kindle
#

isnt typescript to js like less is to css?

warm prairie
#

pretty much

quartz kindle
#

also coffescript

patent tinsel
#

anyone here know how many updates we can do to setPresence (so where it says 'Playing...') and how often/

#

want my presence to update but i'm unsure of if i'll be updating it too fast

quasi marsh
#

I'd recomend a safe side of once every 5 minutes

patent tinsel
#

ooh, i had mine on once a minute

quasi marsh
#

Most libs will handle ratelimiting, so if it would cause problems usually your lib would help

patent tinsel
#

discord.js gotta be my knight in shining armor here

#

oh, once every 15 seconds, okay, cool

#

that's with rich presence though, i don't think this qualifies as rich presence

#

generally 120 events per 60 seconds, so i can do it twice a second if i really wanted to but then anything more would rate limit so eh, 60 secs is fine

ruby dust
#

The ratelimit on updating presence is nearly the same as sending messages

#

But definitely not once every 5 minutes

patent tinsel
#

ooooh

ruby dust
#

But yeah, to stay safe it better to not do it that often

patent tinsel
#

60 seconds should be fine, i may try 30 seconds

#

but other than that not too many updates are made per second

sullen path
#

once every minute is fine, I do mine every 61 seconds cause I can mmLol

magic bane
#

Does anyone else use the reaction-menu npm module here? If so, has anyone been able to remove the menu without getting errors thrown in the console?

spring ember
#

Ask the question

magic bane
#

Edited dancepepe

spring ember
#

Delete?

#

I mean RM.delete

magic bane
#

Well, whenever I use either menu.delete() or message.delete() it throws errors in console.

#

Let me see

spring ember
#

This is the code of delete

magic bane
#

That's menu.delete() isn't it?

spring ember
#

Yes

magic bane
#

Yeah, that throws errors too. It's odd.

spring ember
#

So the error is probably from message

#

Can you send the error?

magic bane
#

Of course, let me add the code and grab the error.

spring ember
#

👍

magic bane
#

Okay, well. Apparently menu.delete(); works now. Apparently my bot likes to have mood swings but thank you very assisting me.

spring ember
#

Probably the websocket died or something

magic bane
#

@spring ember Okay, I lied. This has just came through after a user executing the command and whacking the reaction.

{ DiscordAPIError: Unknown Message
1|run      |     at item.request.gen.end (/root/bots/GlobalBanz/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:71:65)
1|run      |     at then (/root/bots/GlobalBanz/node_modules/discord.js/node_modules/snekfetch/src/index.js:215:21)
1|run      |     at process._tickCallback (internal/process/next_tick.js:68:7)
1|run      |   name: 'DiscordAPIError',
1|run      |   message: 'Unknown Message',
1|run      |   path:
1|run      |    '/api/v7/channels/460377275460878348/messages/470255731447300116/reactions/%E2%9D%8C/429032704848297985',
1|run      |   code: 10008 }
#

The only code in that reaction is menu.delete();

spring ember
#

Oh it seems the message does not exist

#

Did you delete it manually?

magic bane
#

Nope, this is the code for the reaction

{
      emoji: '❌',
      run: (user, message) => {
          menu.delete();
      }
    }
spring ember
#

Did you do send?

magic bane
#

send for which I'm sorry?

spring ember
#

menu.send

magic bane
#

Yes I'm sorry

spring ember
#

Np

magic bane
#

let menu = new RM.Menu(message.channel, handler, { RM: { disable: { left: true, right: true } }, RC: { owner: message.author.id } })
                    let btns = makeBtns(menu)
                    for (let page of pages) {
                        await menu.add(page).catch(console.error)
                    }
                    menu.send(btns).catch(console.error)
spring ember
#

Umm idk does the bot actually sends the menu to discord?

magic bane
#

Yeah, apart from that reaction - the menu works perfectly but I cannot really have an exit reaction that doesn't exit.

spring ember
#

That is really weird

quartz kindle
#

unknown message is either message was deleted or hidden by message history, or the bot can no longer access the channel or server

#

to make sure you're getting the correct message, you can console log menu or message

earnest phoenix
#

um... Could I get some assistance with a library?

quartz kindle
#

which lib?

earnest phoenix
#

Eris

quartz kindle
#

i havent used eris, so idk if i can help you

#

but ask anyway

earnest phoenix
#

well im trying to get the bots perms

#

I used this to get user perms msg.member.permission.has("administrator"))

#

I just cant find a way to check the bots perms

quartz kindle
#

you can try msg.channel.permissionsOf(id)

earnest phoenix
#

ohh thank you

knotty steeple
#

also it has to be in caps

earnest phoenix
#

what has to be?

knotty steeple
#

permissions

earnest phoenix
#

oh

#

it worked in lowercase for me

knotty steeple
#

¯_(ツ)_/¯

quartz kindle
#

but if you want to check for bots permissions before sending the message, use client.channel(id).permissionsOf(id)

earnest phoenix
#

@sinful depot what's the problem?

#

what did you do?

sinful depot
#

i 100% dont know how to code the bots

earnest phoenix
#

lol

#

nobody cares

#

dont be mean

ruby dust
#

I mean

#

how do I know which one of these specifically was updated?

gilded blaze
#

Before and After

#

Check each one

slender thistle
#

An if statement on before.status/after.status?

ruby dust
#

well I know that before and after are the same member objects, so I just compare between each one if they have a difference?

pale marsh
#

Compare each property

gilded blaze
#

Yes

spring ember
#

They are not

#

They have a different reference

earnest phoenix
#

help

#

python me

pale marsh
#

Huh?

ruby dust
#

well how about roles? how would I specify what role was added/removed?

spring ember
#

Compare the lists

pale marsh
#

^

ruby dust
#

that's what I'm asking, I might not know python that well to know how to compare lists

#

I know caching more than comparing lists, what is this Thonk

pale marsh
#

Check which list is bigger. If before is bigger then the role was removed and vice versa, then remove the roles in the other list from the first one

earnest phoenix
#

prog_str

ruby dust
#

ok, sounds about right

earnest phoenix
#

this prog_str is [0:00:00/0:03:12] this

slender thistle
#

wat

earnest phoenix
#

i need this the duration of the song only

spring ember
#

You need to iterate over the first and create a set

#

Remove from the second lists and add if not contained

#

You will get a set of roles that were modified from the user

pale marsh
#

Basically what I said

spring ember
#

But with sets

#

Because time complexity

earnest phoenix
#

hello?

spring ember
#

And I was stupid and didn't read your message

earnest phoenix
#

oi

pale marsh
#

Well idk python tbh. I’m just talking about the logic 🤷

spring ember
#

@earnest phoenix what

pale marsh
#

@earnest phoenix what do you need help with?

spring ember
#

@pale marsh set is in every lang

pale marsh
#

Do you mean lists?

spring ember
#

I mean sets, lists are too

earnest phoenix
#

@spring ember @pale marsh hi lovely people

spring ember
#

No u

earnest phoenix
#

i wanted help

spring ember
#

About what

earnest phoenix
#

thank you for saying i'm lovely @spring ember

pale marsh
#

I’ve never encountered a Set object in .Net before tbh

#

Just say what the problem is already 😂

earnest phoenix
#

right

#

sorry

spring ember
#

You 100% should read about them they are super vital and necessary most of the time

earnest phoenix
#

this is progress=prog_str this [0:00:10/00:30:43]

#

i need only duration

#

i use progress in my message

#

then it convertes it

#

to that

#

cause i put prog_str

spring ember
#

Umm regex maybe

#

What are you using

earnest phoenix
#

python

#

0:0

spring ember
#

No

#

What library or class give code

earnest phoenix
#

my library is python

#

)_(

spring ember
#

Ree what gives you the prog_str

pale marsh
#

That’s interesting actually. I never knew this existed 🤔
I gotta look up the differences between it and List objects

spring ember
#

You should!

earnest phoenix
#

i asked a friendly people then they give me this progress code as i was unable to do it

#

` async def cmd_progress(self, player, channel, server, message):
"""
{command_prefix}progress

    Displays the progress of the song in chat |
    """

    if player.current_entry:
        if self.server_specific_data[server]['last_np_msg']:
            await self.safe_delete_message(self.server_specific_data[server]['last_np_msg'])
            self.server_specific_data[server]['last_np_msg'] = None

        # TODO: Fix timedelta garbage with util function
        song_progress = ftimedelta(timedelta(seconds=player.progress))
        song_total = ftimedelta(timedelta(seconds=player.current_entry.duration))

        streaming = isinstance(player.current_entry, StreamPlaylistEntry)
        prog_str = ('`[{progress}]`' if streaming else '`[{progress}/{total}]`').format(
            progress=song_progress, total=song_total
        )
        prog_bar_str = ''

        # percentage shows how much of the current song has already been played
        percentage = 0.0
        if player.current_entry.duration > 0:
            percentage = player.progress / player.current_entry.duration
        """
        This for loop adds  empty or full squares to prog_bar_str (it could look like
        ■■■■■■■■■■□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□
        if for example the song has already played 25% of the songs duration
        """
        progress_bar_length = 20
        for i in range(progress_bar_length):
            if (percentage < 1 / progress_bar_length * i):
                prog_bar_str += ''
            else:
                prog_bar_str += '='

        action_text = self.str.get('cmd-np-action-streaming', 'Streaming') if streaming else self.str.get('cmd-np-action-playing', 'Playing')

`

#

if player.current_entry.meta.get('channel', False) and player.current_entry.meta.get('author', False): np_text = self.str.get('cmd-np-reply-author', "Now {action}: **{title}** added by **{author}**\nProgress: {progress_bar} {progress}\n\N{WHITE RIGHT POINTING BACKHAND INDEX} <{url}>").format( action=action_text, title=player.current_entry.title, author=player.current_entry.meta['author'].name, progress_bar=prog_bar_str, progress=prog_str, url=player.current_entry.url ) else:

spring ember
#

Hastebin please

earnest phoenix
#

they gave m this

#

ok

spring ember
#

@earnest phoenix player.current_entry.duration

#

This will give you the duration in ms

pale marsh
#

So from what I get the difference is that HashSet doesn’t allow dupes and has better performance

spring ember
#

Format it as you wish

#

@pale marsh yes

earnest phoenix
#

thank you but yeah can we

#

have it like 0:0:0

pale marsh
#

Huh

#

It might be better to use a hashset in the future then xD

#

So you know what the time complexity is?

#

Do*

spring ember
#

O(1) for add contains and removal

pale marsh
#

And for List?

spring ember
#

The downside is that it is not sorted

pale marsh
#

There’s a SortedSet object

spring ember
#

@pale marsh O(1) add O(n) contains and removal

pale marsh
#

Gotcha

spring ember
#

SortedSet is basically a binary tree

#

and the complexity is different

ruby dust
#

btw, on_member_ban has a guild parameter, does it default to the guild where the event was triggered?

pale marsh
#

Yes

ruby dust
#

ok thank

pale marsh
#

Np

earnest phoenix
#

cause this looks badass

#

and i cant do it

quartz kindle
#

cache the message and edit it every x seconds?

earnest phoenix
#

no i mean

#

like

#

the look of it

#

and the way its make so the time in the song is on the left and the song duration is on the right and

#

:(

quartz kindle
#

[ 1:23 ======== 2:30 ]

#

?

earnest phoenix
#

yea

#

that badass thing

quartz kindle
#

why cant you do it?

earnest phoenix
#

that is what currently have

spring ember
#

Don't ask for a spoon-feed

quartz kindle
#

it isnt hard to do

earnest phoenix
#

can i atleast get help

quartz kindle
#

split the string into 3 sections

spring ember
#

Ask a question

quartz kindle
#

something like
section 1 = "[ currenttime ";
section 2 = "";
section 3 = " totaltime ]"

earnest phoenix
#

you mean this

#

action=action_text,
title=player.current_entry.title,
progress_bar=prog_bar_str,
progress=player.current_entry.duration,
url=player.current_entry.url

#

yeah whats the thing for current time????

quartz kindle
#

then you edit section 1 to current time, and section 2 to the amount of filled blocks

earnest phoenix
#

right

#

so what is current time

#

in python

quartz kindle
#

idk i dont use python

#

but you have player.progress and player.current_entry.duration in your code

#

try using that

spring ember
#

@earnest phoenix you get the current time with datetme.datetime.now()

#

You don't seem to need it though

earnest phoenix
#

action=action_text, title=player.current_entry.title, progress_bar=prog_bar_str, progress=player.current_entry.duration, progress_time=player.progress url=player.current_entry.url

young mortar
#

how to make Mee6 Ranking System fully done

#

🤔

spring ember
#

What

#

@earnest phoenix please send relevant code

young mortar
#

How to make a rating system as of mee6

spring ember
#

You need to think of something to rank it by

#

And have a database linking user IDs to rank points

ruby dust
#

on_member_update is trowing me 'Member' object has no atribute 'nickname'

spring ember
#

@ruby dust don't use nickname

ruby dust
#

then what?

spring ember
#

use str(member)

young mortar
spring ember
#

It will give you the relevant name

earnest phoenix
ruby dust
#

hm

young mortar
#

?

spring ember
#

@earnest phoenix you forgot to add , before the url

earnest phoenix
#

like this?

spring ember
#

@young mortar idk what you did there but nice API key

earnest phoenix
#

oh

spring ember
#

@earnest phoenix yes

#

Lmao

earnest phoenix
#

you mean

#

,

#

^^

young mortar
#

😦

spring ember
#

Yes @earnest phoenix

#

@young mortar the implementation is up to you

#

And don't copy paste mee6's code

#

It will not work

earnest phoenix
#

@spring ember Thank you but i dont need it in ms i need it in 0:0:0

spring ember
#

@earnest phoenix so format it

young mortar
#

XD

spring ember
#

@earnest phoenix the amount of seconds is ( ms/1000 )%60

#

You can do the rest

slender thistle
#

@ruby dust Isn't it nick

ruby dust
slender thistle
#

TIAS GWchadThink

spring ember
#

@ruby dust this is a list of all the things that have changed lmao

#

game playing is not the name of the property too

#

but use str(member) still

#

way better

ruby dust
#

doesn't seem to work as well

#

also I'm getting these for no reason

In embed.fields.1.value: This field is required```
spring ember
#

umm?

#

send code?

slender thistle
#

Well, the value is empty

#

:^)

spring ember
#

yea

slender thistle
#

And nobody knows why GWchadThink

ruby dust
#

I guess it's because I can't get it to post that fucking nickname into the field

#

and how does str(member) suppose to fix it? cause there is no such parameter like that anyway

slender thistle
#

str(discord.Member) Returns the member’s name with the discriminator.

ruby dust
#

and even if it would work it would return a whole member object, not just their name

#

where did you get that?

slender thistle
#

docs?

#

A bit of ads there but yeah

ruby dust
#

nah, still having difficulties

spring ember
#

ree

#

send code

#

and output

ruby dust
#

I'm not using member because there is no such parameter, so I'm using str(after) and str(before)

spring ember
#

that's what I meant basically

slender thistle
#
    async def on_member_update(self, before, after):
        if before.nick != after.nick:
            # get "chan" from some guild
            await chan.send(str(before.nick) + '\n' + str(after.nick))
#

Works for me

#

¯_(ツ)_/¯

ruby dust
#

why the fuck does it say nickname in the docs

slender thistle
#

And because... yes GWchadThink

ruby dust
#

sometimes the docs are confusing

earnest phoenix
#

i done

#

it

#

ayyyyyyy

#

does it look any good?

slender thistle
#

Not much bad, at least

quartz kindle
#

looks nice

earnest phoenix
#

thank you guys for the help

ruby dust
#

ok I made it to post, but I'm still getting spammed with this

In embed.fields.1.value: This field is required```
#

and idk what's the cause of it

earnest phoenix
#

is ther any free alternative to keep my discord up 24/7? (not heroku)

ruby dust
#

skysilk is in free beta testing

earnest phoenix
#

@earnest phoenix are you a student?

#

no

#

im 14 XD

#

well do you have anyone in your family who has a studen id

#

oh

#

well

#

and in grade 9 XD

#

im getting one in september

#

do you have your student ID on you?

ruby dust
#

I just said, skysilk

earnest phoenix
#

@earnest phoenix

#

im trying out skysilk

#

ues @earnest phoenix

#

wait

#

yes*

#

anyway if you have a student id you can get a free vps for 1 year

#

lol

#

which is the best choice

#

well

#

ever

ruby dust
#

or that

earnest phoenix
#

i need it for life time

#

sp uea

#

yea*

#

@ruby dust wait is that vps too?

#

@ruby dust i just signed up

ruby dust
#

why tf would I not give a vps while asking for a vps

earnest phoenix
#

didnt understand

#

what you meant

ruby dust
#

I feel like you just keep ignoring my messages and keep asking that student id

earnest phoenix
#

XD

#

XD

ruby dust
#

I don't see that being funny

earnest phoenix
#

well take a bath

#

or sleep then you will find out

#

@ruby dust how long does it take for the request?

ruby dust
#

mine got approved in like 2 days

earnest phoenix
#

ok

#

so you get it life time, correct?

#

@ruby dust does skysilk run windows?

slender thistle
#

Whatever you choose when creating the machine

#

or probably Linux

ruby dust
#

it's a fucking vps, you know how vps' work

earnest phoenix
#

right

slender thistle
earnest phoenix
#

thank you

#

wait @ruby dust i watched a video about skysilk and it says after the beta it will charge you is that true?

#

Can someone help me out?

spring ember
#

@earnest phoenix yes

ruby dust
#

that is true, but they didn't end beta yet and they had to do it over half a year ago, but even after beta there will be a free plan that will be enough to host a bot on over 500 servers if you aren't planning to host anything heavy on it

earnest phoenix
#

ah ok

#

help

#

notepad++ is broken

ruby dust
#

idek why you even using notepad++ for python coding

earnest phoenix
#

faster for me

#

anyway help

ruby dust
earnest phoenix
#

use visual studio code

ruby dust
#

no need for such a hassle just for python

night imp
#

if your a student use pycharm

ruby dust
#

sublime text is all you need

earnest phoenix
#

wait

#

does sublimetext work with js?

ruby dust
#

yes

earnest phoenix
#

is it better then visual studio code?

uncut slate
#

subjective

ruby dust
#

it's lighter for sure though

earnest phoenix
#

do you use it?

ruby dust
#

always

#

for python

earnest phoenix
#

ah

ruby dust
earnest phoenix
#

ahh you use python

slender thistle
#

There is syntax support for js too

quartz kindle
#

sublime is nice because of the package system

#

you can find packages for almost everything

#

for example, i have less->css compiler->minifier->upload via sftp on save

earnest phoenix
#

you guys sure skysilk has windows?

quartz kindle
#

why do you want a windows vps?

earnest phoenix
#

any vps is good

#

you know that

#

not for me

#

if its not windows

#

then its not worth it

#

cause my special codec needs windows

#

waht codec is it XD

#

:=-0

#

you make a discord bot correct?

knotty steeple
#

get a linux vps

#

its better actually

earnest phoenix
#

@earnest phoenix daaam my name is green tho

#

same here

#

that means i'm dangerous?

#

you make a discord bot correct?

#

why is my name green you tell me @earnest phoenix

#

ok

#

discord bot can be use on my computer / vps server

#

so why windows vps?

#

cause

#

my codec

#

need windows

#

if you want windows vps use asuze

#

its payed tho

#

too expansive i use amazon

#

XDDDDD

#

asuze is one of the most affordable ones XDD

#

amazon is

cinder patio
#

how much is it

earnest phoenix
#

azure

#

the differents is like double the per hour

#

there for amazon is 50% cheaper

cinder patio
#

I'm planning on hosting my bot on my old computer

#

it's way easier

earnest phoenix
#

well , my bot needs 8 cores

quartz kindle
#

what codec is that?

earnest phoenix
#

i cant say

#

if i do

#

0.016/hour | 12 months free

#

XDDDD

quartz kindle
#

and you're sure that codec is not available for linux?

earnest phoenix
#

you guys saw nothing

#

yep

quartz kindle
#

usually stuff like that have linux implementations

humble gyro
#

Sounds perculiar

earnest phoenix
#

hes so picky XD

#

oh well

quartz kindle
#

well im not an audiophile, i dont notice any difference between lq hq music bots

earnest phoenix
#

:9

quartz kindle
#

i can listen to 4-8k bitrate music

#

lul

earnest phoenix
#

here are the pricing for azure

#

ouch

#

sounds nice

quartz kindle
#

Lol

earnest phoenix
#

lol

quartz kindle
#

why do you need a gpu

earnest phoenix
#

XDD

#

i dont

quartz kindle
#

u gonna game on a vps?

earnest phoenix
#

ikr

quartz kindle
#

xD

earnest phoenix
#

hahah

#

XDD

#

man

#

Mining

#

better

#

kids today

#

@earnest phoenix its a bit rude to call me kid

#

naaaaaaaaa

#

XD

#

amazon has this for 0.200 per hour

#

and i need 8 core

#

o

#

thats why

quartz kindle
#

is your bot that big?

earnest phoenix
#

wanna see something

#

well 4 cores wasnt able to handle it

#

soo

#

look at all the price buddy

#

6 cores wouldnt last for long

#

omfg

#

XDDD

quartz kindle
#

my bot runs on a single core 600mb ram

earnest phoenix
#

daaam

#

my bot needs cpu not ram

heady zinc
#

mine runs on a single core too

earnest phoenix
#

i can tell you are a new progammer

knotty steeple
#

mine runs on 2 cores

earnest phoenix
#

well mine is a music bot

#

guys

#

that depends on your plan

#

po

#

ok

#

soo

heady zinc
#

music shouldn't need so much

knotty steeple
#

music bots need cpu?

earnest phoenix
#

yea

#

i have a music bot and it runs on like 1 core XD

#

no

#

when i was using a trial vps

knotty steeple
#

i thought it just needs enough ram

earnest phoenix
#

nope

#

atleast not for my bot

heady zinc
#

nah music is cpu-intensive

quartz kindle
#

are you processing music in real time with your codec?

earnest phoenix
#

yea

quartz kindle
#

transcoding audio?

earnest phoenix
#

yea

quartz kindle
#

then thats why

earnest phoenix
#

^

#

he prob doesnt even know what that means

#

dude

#

omg

#

i do

#

can you please grow up

#

me grow up?

#

you are so picky on you f*cking vps

#

"only windows"

#

lol

#

@quartz kindle guess what more cores means faster processing that is where the more core also comes in

quartz kindle
#

if thats what he wants, let it be

#

why do you feel the need to point fingers at others?

earnest phoenix
#

what?

quartz kindle
#

that was to nutty

earnest phoenix
#

ah

#

nutty

#

XD

#

ok ill let it be 😃

#

Thank you

#

i need to see the clock speed

#

well azure doesnt show clock speed of the cpu so it could be 1ghz

#

XD

#

i found it

#

it wont be 1 ghz

#

i know

#

those are high quality vps

#

i was joking

#

its the same cpu xeon Broadwell and the same cores for cheaper on amazon

#

the basically the same price

rare owl
#

medahelp wtf????

earnest phoenix
#

wouldnt threadripper be good for server

#

why dont they use it

ruby dust
#

turns out the embed field value errors I was getting was because of on_message_edit's after was returning None, conflicting with other unrelated events for no reason Thonk @spring ember

earnest phoenix
#

@ruby dust is @spring ember under 13?

#

actually?

ruby dust
#

yes

earnest phoenix
#

what

ruby dust
#

no

earnest phoenix
#

the

#

fffff

ruby dust
#

yes and no

#

your choice

quartz kindle
#

hes a 9 year old genious

#

the next einstein

earnest phoenix
#

lol

heady zinc
#

ofc he is

earnest phoenix
#

anyone know how to convert an emoji name to a unicode character in python

#

ex thinking to \🤔

earnest phoenix
#

@ruby dust you told me about sublime, do you use the unregistered version?

ruby dust
#

yes

earnest phoenix
#

ah

#

ok

ruby dust
#

sublime is as free as winrar mmLol

earnest phoenix
#

it works good with js too?

ruby dust
#

if you modify a js file then it will be helpful enough to follow syntax, yes

earnest phoenix
#

ok

heady zinc
#

isn't sublime limited

earnest phoenix
#

no

#

i dont think so

languid vault
knotty steeple
#

cuz its under 300 characters

#

duh

languid vault
#

so how am i supposed to do it again

#

what the heck

#

bro

spring ember
#

you need to start typing

earnest phoenix
#

is there anyway i can install dblclient

languid vault
#

why is it just broken

earnest phoenix
#

Whats the best Chat Bot API?

quartz kindle
#

chat bot?

earnest phoenix
#

Yes

#

@ruby dust hey, forgot to ask but do you have to add your credit card to skyslick vps?

slender thistle
#

SkySilk require credit card for verification.

earnest phoenix
#

can i jsut use like a fake creditcard?

#

cuz i dont want to use a real credit card

pale marsh
#

I think they invoice a $1 payment to avoid such scams

earnest phoenix
#

really?

slender thistle
#

No.

#

You think so, but you are wrong.

#

They didn't take a single cent off my QIWI Visa Card.

#

And... fake credit card? I doubt they would appreciate that.

earnest phoenix
#

idk

#

😄

#

Hi

#

Ok

pale marsh
#

SkySilk?

#

Never heard of that service before

ruby dust
#

if you haven't heard of that why did you just randomly think of that $1 thing?

pale marsh
#

Because most services do that

ruby dust
#

@earnest phoenix your answer

pale marsh
#

They do refund it eventually I think

slender thistle
#

And SkySilk does not take your money.

#

At all.

ruby dust
#

while it's in beta testing they need your credit card info just to confirm your identity

#

so if you do some illegal shit they'll know who to blame

earnest phoenix
#

ok

#

cuz

#

im kind of skeptical of putting a creditcard

ruby dust
#

you shouldn't be if it's a trusted service

earnest phoenix
#

ok

ruby dust
earnest phoenix
#

😃

earnest phoenix
#

can someone help me here, whenever i run this command:

m!eval message.channel.send(client.guilds.get('110373943822540800').users.get('240254129333731328').avatarurl)

i get this result:

TypeError: Cannot read property 'get' of undefined

i am using discord.js btw

knotty steeple
#

you dont need .guilds.get('110373943822540800')

earnest phoenix
#

ik

knotty steeple
#

and its .avatarURL

earnest phoenix
#

i did it as a test

#

but what is the error message for?

#

Thanks Samurai, it worked!

#

now i can go back to stealing avatars lol

#

jk

hushed berry
#

Is it bad style to write JS without semicolons?

sullen path
#

depends on who you ask

hushed berry
#

hm

sick cloud
#

I mean, I leave them out all the time @hushed berry, at some times though leaving them out can break your code, so it's best to use them whenever possible in my opinion.

hushed berry
#

Hmm, alright

knotty steeple
#

semicolons in js arent really needed

#

but sometimes its useful

uncut slate
#

semicolons are (currently) fully optional

#

sure, they can resolve a syntax error in an odd situation but it's definitely possible to write js without semis

#

whether it's bad style isn't agreed on by the community at all

bitter sundial
#

it's your preference

uncut slate
#

pretty much

bitter sundial
#

I like semis

uncut slate
#

just.. whatever you do, make sure you keep consistent

#

either use semis or don't

#

I like em too

quartz kindle
#

i generally use semi-colons on all lines that do not end with }

#

thats also what many js linters recommend

spring ember
#

You should do that

uncut slate
#

well, more or less

earnest phoenix
#

ok i just started using heroku is its going pretty well atm

#

ok

warm prairie
#

I love heroku

earnest phoenix
#

can anyone help me with my play command. when ever i play a song and it ends and try to play another song it says add to queue can anyone help me?
heres the code:https://hastebin.com/uquzixubut.js

pale marsh
earnest phoenix
#

Whats

sick cloud
#

@earnest phoenix, post your server count to the API.

earnest phoenix
#

yes

#

I entered this site but you do not find where you speak

#

can anyone answer my question?

sick cloud
#

Just look at the documentation for the specific language you use, the API has modules you can install and use.

#

@earnest phoenix, makes no sense to me.

quartz kindle
#

@earnest phoenix idk but i didnt see where you unset data.dispatcher. it only plays if there is no data.dispatcher, then sets the dispatcher and never unsets it, at least not from what i saw

earnest phoenix
#

how do i do that?

quartz kindle
#

you are sending data to your finish() function and naming it dispatcher, so data.dispatcher should be dispatcher.dispatcher in your finish() function, try setting it null or deleting it in there

#

looking at it again, something feels wrong, but idk what... when in doubt, hit it will console.logs everywhere :3

earnest phoenix
knotty steeple
#

👀

#

do you even use python

warm prairie
#

lmao

quartz kindle
#

@earnest phoenix is your bot made with python?

earnest phoenix
#

yes

quartz kindle
#

try this

earnest phoenix
#

Okay

quartz kindle
#

also, i speak portuguese, if you have trouble with english

earnest phoenix
#

kkk

#

kk deboas

#

@quartz kindle em dbl_token o que eu coloco ?

sick cloud
#

although if you guys aren't going to speak English, it's best to take it to direct messages @earnest phoenix @quartz kindle

earnest phoenix
#

in dbl token what do I put?

#

hey for heroku when i installed ffmpeg-binaries and try to use my music command it says ffmpeg not found? any fix?

quartz kindle
#

in dbl token you put your bot's dbl token, that you find in your bot's edit page in the discordbots website

earnest phoenix
#

are you talking to me?

#

ok for heroku when i installed ffmpeg-binaries and try to use my music command it says ffmpeg not found? any fix

warm prairie
#

not sure

rancid shuttle
#

how do you post the bot server count to the api?

sick cloud
#

@rancid shuttle, depends what language you use; the API has some premade modules for different languages/libs, or you can use the raw API/URL and send a post request.

rancid shuttle
#

using .net HTTP woudl work also. Is there a link to instructions?

neat falcon
#

hi there, does anyone know why i'm getting this meme error:

(node:9628) UnhandledPromiseRejectionWarning: Error [VOICE_PRISM_DEMUXERS_NEED_STREAM]: To play a webm/ogg stream, you need to pass a ReadableStream.
    at VoiceConnection.play (C:\Users\rando\Documents\Code\Node\Miku Rewrite\Main\node_modules\discord.js\src\client\voice\util\PlayInterface.js:74:50)
    at voiceChannel.join.then.connection (C:\Users\rando\Documents\Code\Node\Miku Rewrite\Main\commands\Meme\soundboard.js:9:48)
    at <anonymous>```
Code: `` const dispatcher = connection.play(`./sounds/${sound}.ogg`, { type: 'ogg/opus' });``
d.js version: master hahayes
earnest phoenix
#

hey @sick cloud could you find and dm me your avatar? i really really like it.

quartz kindle
#

@neat falcon you need to open the file into a stream

earnest phoenix
#

after putting my DL token what should I do to have a quantity of servers?

neat falcon
#

stream blobThonk

#

ah seems legit

#

thanks

earnest phoenix
#

@quartz kindle

quartz kindle
#

if you follow the code in the dbl api examples, it should work right away

quiet acorn
#

isnt it kinda against the rules having the bot listen on discordbotlist

#

if he didn't create it by himself

#

which he obv didn't since he doesn't even know how to install pip

sick cloud
#

(node:9662) UnhandledPromiseRejectionWarning: Error: FFMPEG not found
how do you fix this when you don't have root access? thonk

#

@earnest phoenix 👀 nuh

earnest phoenix
#

Oki fine. I really like your avatar tho

sick cloud
#

earnest phoenix
#

Keep it in mind when you're looking for a Christmas gift lol

#

And as to your node.js problem, i could normally help, but i need a little situational background on this one

quartz kindle
#

if you dont have root access, you can try compiling it yourself

#

see if you can find the ffmpeg binaries and if you satisfy the dependencies and requirments to build it

earnest phoenix
#

thats probs the only way

#

JavaScript

#

People

#

Its not a compiled language

quartz kindle
#

javascript itself isnt, but nodejs native packages/libs are

earnest phoenix
#

Ah yes

#

you can see the error message mentioning nodejs

#

lol

quartz kindle
#

ffmpeg for node requires ffmpeg to be installed in the system for node to build the package

earnest phoenix
#

npm i ffmpeg-binaries is what i used to install ffmpeg for my bot once

sick cloud
#

@earnest phoenix, did that but it still can't find FFMPEG.

quartz kindle
#

yeah some packages have prebuilt binaries

#

theres also node-pre-gyp

earnest phoenix
#

@sick cloud wwhats your os? u said u dont have root accss

#

not sure how npm works on machines with limited access

#

since i have full access on my computers

#

i never need to worry about that really

sick cloud
#

I'm on a user account on a dedi.

earnest phoenix
#

what module are u trying to install?

sick cloud
#

None? I needed actual FFMPEG installed; though dw now.

#

I've contacted the sys admin that has root.

earnest phoenix
#

ok then

#

im not sure what you're trying to do here so i cant help much

sick cloud
#

It's fine, fixed it myself.

quartz kindle
#

npm doesnt need root most times

#

unless a specific package requires it

sick cloud
#

it isn't npm

#

FFMPEG needs apt-get and everything

quartz kindle
#

yeah i get it, was replying to Nao

#

i have a webhost with ssh access but no root, and i managed to install several packages in there by compiling them myself with gcc and make

sick cloud
#

👌

earnest phoenix
#

can anyone help me with my play command. when ever i play a song and it ends and try to play another song it says add to queue can anyone help me?
heres the code:https://hastebin.com/egerexofez.js

wild tide
#

@sick cloud have you figured out your issue with FFMPEG?

sick cloud
#
> ThatTonybo :: Today at 10:55 AM
It's fine, fixed it myself.
wild tide
#

ak ok

#

was gonna say