#development

1 messages Β· Page 462 of 1

dull breach
#

thx works!

quiet bobcat
#

Hi, so I'm trying to make a desktop app and I'm making a custom frame. I want to able to resize everywhere but at the moment I can only resize on the left, bottom and the right side and that's because I have made so that you can drag the window around using the top but I also want to be able to resize the top. I'm making the desktop app with Electron.

My HTML is html <header> <div class = "title"><img style = "height: 20px; width: 80px; float: left; margin-left: 8px;" src = "./assets/icons/png/icon2.png"></div> <div class = "exit" id = "exit">&#x2715</div> <div class = "option" id = "maximize">&#x2610</div> <div class = "option" id = "minimize"><svg name = "minimize" width = "12" height = "12"><rect fill = "#ffffff" width = "10" height = "1" x = "1" y = "8"></rect></svg></div> </header>

And my CSS is

header {
    display: block;
    width: 100%;
    height: 20px;
    -webkit-app-region: drag;
}
.option {
    -webkit-app-region: no-drag;
    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    float: right;
    height: 20px;
    width: 30px;
    text-align: center;
}
.exit {
    -webkit-app-region: no-drag;
    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    float: right;
    width: 30px;
    height: 20px;
    text-align: center;
}```
earnest phoenix
#

@quiet bobcat hi i like what ur going for but i cantsee much of a problem

craggy roost
#

Hello

#

hey everyone! I can't create a "select report channel" command. Who can help me?

quiet bobcat
#

@earnest phoenix i cant resize the window from the top bar

earnest phoenix
#

from the top

#

hold up let me run a preview again

#

oh true

quiet bobcat
#

Know how to fix it?

earnest phoenix
#

it seems that mainly the corners are resizable

#

ill see if i can find my old aplication

#

@quiet bobcat i cant seem to find my old application,

#

im sorry i cant help you with this problem

quiet bobcat
#

alright

karmic parcel
#

so you created the BrowserWindow with frame: false?

#

and then used your header instead of the native frame?

quiet bobcat
#

yes

karmic parcel
#

lemme mess around with an app I did the same thing with

quiet bobcat
#

alright

karmic parcel
#

You can cheat like Discord does

quiet bobcat
#

how?

karmic parcel
#

they do the same thing, but they have a margin-top: 4px on their header so that you can resize the window above the titlebar but it blends in with the titlebar

#

they have a div that acts as their titlebar and added that margin above it, and it's just enough to get the rezise options on the corners easily

quiet bobcat
#

i'll try that out

#

thanks

karmic parcel
#

mhmm, lemme know if that works out for you then!

#

P.S: I tried it on my application, and it works

quiet bobcat
#

yeah works on mine aswell

#

thanks

karmic parcel
#

mhm

split juniper
#

Does anyone know how long the average wait time for the certification process is?

#

I submitted my application a month ago

#

It's my first time so I'm not well-versed with all of this

gleaming glen
quartz kindle
#

my certification took 9 days, but i've seen some that took months

lament meteor
#

well my certif(which got denied) took a month

sick iron
#

I applied a month ago and haven’t heard anything. I would just be patient and wait. I also don’t think #460037222331187200 covers certification waiting times

#

(On crap it does)

quartz kindle
#

it does now

#

lmao

#

posted today

split juniper
#

@gleaming glen thanks!

sick iron
#

well you learn something everyday

craggy roost
#

Hey everyone! How do we get the server to receive the invitation link if we have a bot?

quartz kindle
#

https://discordapp.com/oauth2/authorize?=&client_id=YOURBOTID&permissions=YOURBOTPERMISSIONS&scope=bot

craggy roost
#

Not this.

#

One minute

knotty steeple
#

you want the bot to get the invite link for a server?

craggy roost
#

@knotty steeple yes

knotty steeple
#

o

#

what library

craggy roost
#

discord.js

knotty steeple
#

ok wait a sec

craggy roost
#

ok.

knotty steeple
#

you need a channel id btw

craggy roost
#

default channel id?

onyx hare
#

https://glitch.com/edit/#!/fir-camp can someone proof read this and explain why it wont go live on my Bot Testing server

knotty steeple
#

so <Client>.guilds.get("serverid") then after you get the channel by its id with .channels.get("channelid") and then you have to use createInvite function

#

then you can throw in a .then(i => console.log(i.code)) and thats your invite code

craggy roost
#

Will not the new invitation then create a link? Does it mean trouble for the server owner?

knotty steeple
#

no not really

#

the bot needs the create invite link permission

earnest phoenix
#

How would I add message.author.id to this array 25 times?

result.body.items.map(vTitleLength => server.userSong.push())

server.userSong is the array im trying to add message.author.id to 25 times

craggy roost
#

My bot is have this permission

knotty steeple
#

so then just follow what i told you

craggy roost
#

Hmm

knotty steeple
#

thats just the code btw (the thing after https://discord.gg/)

quartz kindle
#

@onyx hare there is nothing about discord in your bot

earnest phoenix
#

Anyone please?

knotty steeple
#

loop it

quartz kindle
#

also, your habbo token is public there, you should remove it

earnest phoenix
#

Yeah... How? πŸ˜‚

craggy roost
#

@knotty steeple Ok. Thanks.

zealous veldt
#

Pls

knotty steeple
#

well you can just google javascript loops

onyx hare
#

πŸ€” what parts are needed to make discord on there

quartz kindle
#
zealous veldt
#
for (i=want; too>69; die++;){}
knotty steeple
#

thats not valid wew

zealous veldt
#

This is why I need intelisense

quartz kindle
#

want is undefined, too is undefined, unexpected ";" on line 1

zealous veldt
#

I tried

knotty steeple
#
for (i = 0; i < 25; i++) { 
// do stuff 
}
#

wew

onyx hare
#

I’m a very slow learner

knotty steeple
#

@earnest phoenix this is how you would do a loop

#

then u just put your code in place of // do stuff

junior bobcat
#

in node.js, there is bot.on('guildMemberAdd', (msg) => { when there is a new member on a guild. but what is the ligne when the bot is on a new server ?

zealous veldt
#

guildCreate

quartz kindle
#

^

junior bobcat
#

ok I'll try thanks

zealous veldt
#

Make sure to replace msg with guild unless you're crazy

gleaming glen
#

i wasn't able to change the "created by" text's color in my bot's page, i changed everything else but i can't change that

#

can someone help?

knotty steeple
#

what did u do

gleaming glen
#

i made background black

#

so created by is not visible

#

but for some reason i can't change the color of it

craggy roost
#

@knotty steeple

#

This is wrong. But I do not know where I made it wrong

knotty steeple
#

in the then you have to send the message

craggy roost
#

How do I send this to embed?

zealous veldt
#
let want, to = 69;

for (i = want; to < die; i++) { 
![cloudbleed](https://cdn.discordapp.com/emojis/286575873887436800.webp?size=128 "cloudbleed") ![zoomeyes](https://cdn.discordapp.com/emojis/390046883281633290.webp?size=128 "zoomeyes") 
}```
gleaming glen
#

so everyone is ignoring me GWsetmyxPeepoCry

knotty steeple
#

instead of doing everything else outside of the .then() do it inside it

#

uh no @gleaming glen

#

i asked u what u did u didnt say so GWcmeisterPeepoShrug

gleaming glen
#

i said

knotty steeple
#

what

#

code

#

did

#

you

#

use

gleaming glen
#

css?

knotty steeple
#

yes

gleaming glen
#

<style> and stuff like that

knotty steeple
#

i cant help you if i cant see what u did

#

so

gleaming glen
#

im just asking how can i change the createdby text's color

#

i did change others

#

but i cannot change that for some reason

knotty steeple
#
#createdby {
color: #hexhere;
}
#

iirc

pale marsh
#

CSS

#

Yeah something like that

gleaming glen
#

do i put # ?

#

i didnt put that

#

okay that worked thx

craggy roost
#

@knotty steeple I can't 😦

earnest phoenix
#

let davetlinki = msg.guild.channels.get(msg.channel.id).createInvite().then(invite => ... ?

#

SyntaxError: missing ) after argument list

craggy roost
#

I continued at the bottom

#

He put it on his side and made a mistake

earnest phoenix
#

u need {} captain_facepalm

craggy roost
#

I'm using translate

knotty steeple
#

you can remove let davetlinki = also

craggy roost
#

Same

earnest phoenix
#

i mean that wont work since the embed is out of scope of sending it

#

and the syntax is wrong anyway

craggy roost
#

Could you make an example? I do not understand this.

earnest phoenix
knotty steeple
#

how do you get a mention from a message discord.js

#

forgot :v

craggy roost
#

I mean, I do not understand exactly. Now what am I supposed to do?

knotty steeple
#

just read what tom sent

earnest phoenix
#
(param1, param2, …, paramN) => { statements } 
(param1, param2, …, paramN) => expression

first example

craggy roost
#

I mean, do I have a fancy bracket?

earnest phoenix
#
then(invite =>
  let srembed = new Discord.RichEmbed()
  .setTitle("Sunucu Reklam")
  .setColor(ayarlar.renk)
  .addField("Link",invite.url)
);

thonkspin

craggy roost
#

I did so. It's working now.

earnest phoenix
#

πŸ‘Œ nice πŸ˜ƒ

craggy roost
#

πŸ˜„ Thank you

knotty steeple
#

none responded to me

craggy roost
#

And Thank you @knotty steeple

knotty steeple
#

oh no problem

craggy roost
#

πŸ˜„

earnest phoenix
#

@craggy roost You could also await the invite since your function is async, then continue the embed after it

#

cleaner looking code that makes more sense

craggy roost
#

So you want to be deleted after you write the command?

earnest phoenix
#

no, instead of

msg.guild.channels.get(msg.channel.id).createInvite().then(invite => {
  //use invite
});
const invite = await msg.guild.channels.get(msg.channel.id).createInvite()
//use invite
craggy roost
#

Oh, I understand

#

Ok.

earnest phoenix
#

πŸ‘

craggy roost
#

πŸ‘

#

Thanks for everything

lament meteor
#

@knotty steeple u still searching for how to search for mentions?

knotty steeple
#

no

#

got it

pale marsh
#

Regex

lament meteor
#

xD i knew it

#

regex or message.mentions

pale marsh
#

Yeah or that

earnest phoenix
#

i can just concatenate an emoji with a string to get the emoji right? (D.js)

lament meteor
#

not rlly sure wat ur asking but it sounds like u can

west raptor
#

http://prntscr.com/ki3l2e ```js
function play(guild, song) {
const serverQueue = this.queue.get(guild.id)

if(!song) {
    serverQueue.voiceChannel.leave();
    this.queue.delete(guild.id);
    return;
}

const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
    .on('end', () => {
        console.log("Song Ended!")
        serverQueue.songs.shift();
        play(guild, serverQueue.songs[0]);
    })
    .on('error', error => console.error(error));
dispatcher.setVolumeLogarithmic(5 / 5);

}```

Lightshot

Captured with Lightshot

gilded blaze
#

Queue is undefined

lament meteor
#

^

ruby dust
#

in discord.py, if I don't want to use something like member: discord.Member in the command parameter, is there a way I could either still check if the discord.Member object was passed or assign it manually?

spring ember
#

Where

#

What function

ruby dust
#

something like if member == discord.Member or member = discord.Member, in any command, cause I don't need it to default to the member object all the time, I need to do it manually

spring ember
#

instanceof

#

Nvm

#

What do you need to compare

#

You can always use polymorphism

ruby dust
#

I need to check if the argument passed in the command is a member object

#

but don't default to it

solid cliff
#

isinstance(object, discord.Member) but dunno if the object would return a string somayb a try except get_user()tm

spring ember
#

You need to use the member as a parameter

#

It will work

#

D.py converts it for you

ruby dust
#

...what did I just say?

spring ember
#

Oh

ruby dust
#

I don't need to default to the member object

spring ember
#

I think

ruby dust
#

I need to be able to do it manually

spring ember
#

Wait a sec

#

(ctx, arg) and you need to check for isinstance

#

You sadly need to do it manually

ruby dust
#

...yeah, that's what I'm looking for

#

so not sadly

#

thanks

slender thistle
#

MemberConverter?

craggy roost
#

Friends. How can I do it unlimited while the bot is creating a channel-invite link?

knotty steeple
#

Can you expose the GC with pm2 (node.js)

craggy roost
#

This command creates a 24-hours invitation link. How can I make this unlimited?

#

Is there anyone there?

night imp
#

Set max age to 0 maybe?

#

create invite({maxAge:0})

craggy roost
#

One second

#

I try it

#

Thank you

night imp
#

Np have fun coding

craggy roost
#

u2

runic cloud
#

HEllo

craggy roost
#

Hi!

runic cloud
#

I need help for code my bot

#

.commands

neat falcon
#

what commands?

runic cloud
#

.commands

neat falcon
#

wdym?

runic cloud
#

@neat falcon

neat falcon
#

what do you mean?

runic cloud
#

i need help for code

neat falcon
#

you haven't said what exact code

runic cloud
#

basically when the founder does .roleplay [@User] the bot creates and adds the Roleplay role

#

@neat falcon

neat falcon
#

(from discord.js docs) to create a role, you would do: js // Create a new role with data guild.createRole({ name: 'Super Cool People', color: 'BLUE', }) .then(role => console.log(`Created new role with name ${role.name} and color ${role.color}`)) .catch(console.error)

runic cloud
#

and to add this to a menitioned member

earnest phoenix
#

Has anybody got a good website that would tell me how to get live youtube music to play using YTDL Core please?

#

I tried searching google but nothing came up

knotty steeple
#

read the docs @runic cloud

#

just

#

please

neat falcon
#

Then to add (again from docs)

// Give a role to a member
message.member.addRole('193654001089118208')
  .then(console.log)
  .catch(console.error);```
#

but yes

#

read docs

knotty steeple
#

anyways

#

can you expose the GC with pm2 (node.js)

#

garbage collection wew

earnest phoenix
#

Anyone please? lol

neat falcon
#

i think i know how

#

about a website, not sure

earnest phoenix
#

Tis hard to find a website that gives examples and ideas on how one would do it... Been searching google for about 1 hour now and nothing came up with any use

neat falcon
#

i have an example

earnest phoenix
#

Would you be willing to show me that fine example? πŸ˜‚

neat falcon
#

sure

#
  if (cmd == "play") {
       const voiceChannel = msg.member.voiceChannel;
       if (!voiceChannel) return msg.channel.send(':x: Join a voice channel first');
       if (!args.slice(0).join(" ")) return msg.channel.send(":x: I can't play nothing!");
       voiceChannel.join()
          .then(connection => {
            getInfo(args.slice(0).join(" ")).then(info => {
                let stream = yt(info.items[0].webpage_url, { audioonly: true});
                const dispatcher = connection.playStream(stream);
                msg.channel.send("", { embed: new Discord.RichEmbed().setTitle("Now Playing").setColor("#FA0000").setImage(info.items[0].thumbnail).setDescription("**Title**\n" + info.items[0].title + "\n**Uploader**\n" + info.items[0].uploader + "\n**URL**\n" + info.items[0].webpage_url).setFooter("Information sourced from YouTube") })
                dispatcher.on('end', () => {
                    voiceChannel.leave();
                    msg.channel.send("Left the voice channel.");
                });
            });
        });
    }
``` it also uses ytdl-getinfo, but that can be removed
earnest phoenix
#

Oh lord. I use YouTube Data API to get my info

neat falcon
#

i think i have an example without ytdl-getinfo but idk

wind pine
#

Hello, Im creating a Map to see where my bot is, but I would like to add that when someone invite my bot to his server when I do /serverslist, away from the Server Names, I want to have an invitation from each one is that possible?

#

This is the serverslist command ```js
if (command === 'serverslist'){
let string = '';

client.guilds.forEach(guild=>{

string+= 'Guild name: ' + guild.name + '\n';

})

neat falcon
#

does discord tos even allow that? it seems like there would be problems with privacy

wind pine
#

._.

gleaming glen
#

Bot'd have to create a new invite every time you use that, which is not very good

neat falcon
#

kinda spammy

wind pine
#

:l

earnest phoenix
#

Wouldnt that be inv scraping?

knotty steeple
#

privacy issues

neat falcon
#

once a bot did that on my private server and i was very angeryboye

earnest phoenix
#

lol

neat falcon
#

cc @indigo notch angeryBOYE

knotty steeple
#

things like that are supposed to be done by the end user (they run a command and an invite link for the server is sent)

#

or i think thats how its supposed to go

wind pine
#

ok, I wanted that to can give users the Welcome Message options, cus the bot only says that to specific channels

#

is anyway to do my bot can say it to more than 1 specific channel like creating a modlog?

#
client.on('guildMemberRemove', member => {
    let channel = member.guild.channels.find('name', 'here you add the channel name')
     let memberavatar = member.user.avatarURL
     if (!channel) return
     let embed = new Discord.RichEmbed()
     .setColor('RANDOM')
    .setThumbnail(memberavatar)
    .addField('Name:', `${member}`)
    .addField('Has left the server', ':cry:')
    .addField('Bye Bye :(', 'We all will miss you!!') 
    .addField('The server now has', `${member.guild.memberCount}` +  "members")
    .setFooter(`**${member.guild.name}`)
    .setTimestamp()

    channel.send(embed);
    });
wide ruin
earnest phoenix
#

How does with glitch.com change anything>

wide ruin
#

Some code is different

#

Idk

#

But can you help?

latent heron
#

This is gonna sound weird to you guys

#

But how do I go about the process of creating shards

uncut slate
#

depends on your library

latent heron
#

library?

#

as in the discord lib made for programming langs? in this case it is discord.py

safe bramble
#

client = discord.AutoShardedClient()

latent heron
#

danke

cerulean zinc
#

Any good ideas for commands? I just need some inspiration

latent heron
#

8ball

#

its the easiest one to do

cerulean zinc
#

Not a bad idea

slate kayak
#

anybody here thats good with discord.js ?

uncut slate
#

just ask your question

slate kayak
#

ok i need somebody to just sort a code out for me i have done it but the bot refuses to work after i have put in the left server part and it was working 😦

#

sorry for asking this but its my first time working with coding and also my first bot

pale marsh
#

You forgot braces after guildMemberAdd I think

#

Also you hooked up to the same event twice

slate kayak
#

i did try that also and still nothing 😒

#

i have change the one to return

knotty steeple
#

you dont need 2 guildMemberAdd events

#

also you forgot to end the first one with });

slate kayak
pale marsh
#

I think what you’re looking for is guildMemberDelete or something similar. Idk d.js though

knotty steeple
#

ok ok

#

the first screenshot was better

pale marsh
#

You forgot 2 brackets after the braces

slate kayak
#

sorry im new as hell with this really sorry 😒

#

thats why im asking that somebody could help me with it as its only going to be a welcome bot 😒

knotty steeple
#

well this is basic things

pale marsh
#

There are also 2 extra braces πŸ˜‚

#

In the two return lines, remove the { at the end

#

And add a ;

slate kayak
#

😒 i have been working 3 days non stop on this bot and really want it to work 😒

knotty steeple
#

also welcomechannel.return()

#

i think you should read the docs

earnest phoenix
#

yes

onyx summit
#

Can someone recommend me something like enmap (it should work)

knotty steeple
#

sqlite

slate kayak
#

i was following a tut video and like i said it was working it was just when i have put in the second part 😒

pale marsh
#

@slate kayak watch the vid again

#

You messed up some stuff

slate kayak
knotty steeple
#

which is faster

#

a plain for loop for a forEach

onyx summit
#

nah I mean something nearly as easy

knotty steeple
#

sqlite is easy

onyx summit
#

but not as easy as enmap right?

knotty steeple
#

kinda

#

i mean

#

you need to learn basic sql

#

and get the db viewer

pale marsh
#

@slate kayak in programming if you open a bracket or braces they have to be closed again

#

Look at the bot.on(β€œready” line and follow its example

#

In the other 2 events you have braces that are not closed. I’m not gonna give away where they should be

slate kayak
#

@pale marsh

pale marsh
#

Remove the brace in the second console.log line

#

And you should be good to go I hope

slate kayak
#

its working again yes yes yes thank you @pale marsh

pale marsh
#

Lmao no problem

earnest phoenix
#

uhh

#

.channel.return is not a function

#

but ok

pale marsh
#

Also you’re still hooking to the same event twice smh

earnest phoenix
#

rip

#

it should be guildMemberRemove

pale marsh
#

@slate kayak

slate kayak
#

what do you meen? sorry for asking ?

earnest phoenix
#

in line 16

#

it should be guildMemberRemove not guildMemberAdd

slate kayak
earnest phoenix
#

yes

slate kayak
#

thank you πŸ˜ƒ i did change it now

earnest phoenix
#

plus channel.return isn't athing

slate kayak
#

ok what must it be ?

earnest phoenix
#

channel.send

slate kayak
earnest phoenix
#

no

slate kayak
earnest phoenix
#

.send

#

yes

#

.send

pale marsh
#

@slate kayak send a screenshot of the whole code again

slate kayak
pale marsh
#

There

#

Now try running it

slate kayak
#

its running πŸ˜ƒ

onyx summit
#

okay fuck my bot

slate kayak
#

xD

#

sorry first bot i have made πŸ˜ƒ

onyx summit
#

?

#

okay fuck my bot
has nothing to do with you

slate kayak
#

right back at yea πŸ˜ƒ

#

what do you think @pale marsh ?

pale marsh
#

Looks nice

earnest phoenix
#

c

onyx summit
#

d

earnest phoenix
#

Hey, could I ask a basic question here?

#

yes

#

'

#

@earnest phoenix I moved it to API because its more relevant there. Thank you.

#

0=t

#

Would someone mind explaining to me how to call the member function within in the on command function?
Heres an example of what I am doing

#
@client.command(pass_context=True)
async def login(ctx, email="None", member: discord.Member = None):
    author = ctx.message.author.id

    print(discord.Member.roles)
ruby dust
#

are you on rewrite?

earnest phoenix
#

No im trying to run it just on command

ruby dust
#

async and rewrite

earnest phoenix
#

Oh sry

#

Async

uneven depot
#

Hey quick question. Has anyone seen that blue upvote thing (when you visit profile page of a bot) drop to 0 or 1 but the # of upvotes in the list stay the same? It seems like the server count generally increases and i haven't seen any bug reports and error logs seem fine, so it doesn't seem like a stability issue on the bot side. Just wondering if anyone has experienced something like that and/or if it's a known issue.

#

seems to of happened to a handful of bots I have, but not all of them.

earnest phoenix
#

wut

uneven depot
quasi marsh
#

The blue button is monthly, but on your page it's total of all time

uneven depot
#

Ah i see. Yeah all those bots are less than a month old I believe. So that would explain it, thanks!

knotty steeple
#

how do you create a database with mysql

uneven depot
#

create database <database name>;

brave wedge
#

how can I get data from the dbl API on a website without CORS freaking out?

quasi marsh
#

You can't, the web server needs to allow your domain

#

What you can do is use a 2-step process, by loading it into your database and then loading the data from your database

#

Which data would you like to show on your website?

brave wedge
#

damn, okay. its just the guild count

quasi marsh
#

You could let your bot set guild count in a database and load that value on your website

brave wedge
#

ill have a look, thanks

#

is there any reason not to get the data live on the server side? that should work right?

quasi marsh
#

What I do is I have my bot set the guild count on every update of it

#

My web server will then display the guild count by loading it from the database

brave wedge
#

its a few bots though thats the thing. previously i had my own API but it was very badly made. otherwise im probably making a cron job for it

quasi marsh
#

You could use a template engine like pug or jinja2

brave wedge
#

yeah thats probably what ill stick to just due to ease. thanks πŸ‘

earnest phoenix
#

Is there a piece of JS code that displays the version of your Node?

latent heron
#

idk for JS but definitely one for d.py

sick cloud
#

process.version

earnest phoenix
#

Cheers

sick cloud
#

can't remember if it's a function or not

#

but np

uncut slate
#

it is not

latent heron
#

for me its discord.__version__

uncut slate
#

that's not your node version

latent heron
#

oh

#

as in

#

programming version?

uncut slate
#

yes

latent heron
#

ah

earnest phoenix
#

does it include the v? or would I do v${process.version}?

latent heron
#

thats also __version__

uncut slate
#

it includes the v

earnest phoenix
#

I want it to display v8.11.3

sick cloud
#

just use process.version

earnest phoenix
#

Ik does it include the v also? lol

latent heron
#

it is a waste of time trying to organize version number to your liking

#

yes

#

v

earnest phoenix
#

Okay ty

#

Just wanted to be sure πŸ˜‚

latent heron
#

aetheryx told you already

earnest phoenix
#

Ah, never seen the message. Sorry

latent heron
#

im sure he wouldnt tell you if he didn't know how to code JS

#

yeah

#

cheers

earnest phoenix
#

What about the OS Im using or do you have to do that manually?

#

hm

#

I'm trying to make my bot work with mentions too

#

idk how to define the args for my command handler anymore

#
  if(!message.isMentioned(Bot.user)) {
    if(!message.content.toLowerCase().startsWith(Bot.config.prefix.toLowerCase()) return;
  }

  const args = message.content.slice(Bot.config.prefix.length).split(/\s+/);```
#

It works on a regular prefix, but since the slice only works on the regular prefix its kinda yeah :/

uncut slate
#

@earnest phoenix process.platform

earnest phoenix
#

Ty

#

My old command handler got the command name like this

const args = message.content.slice(Client.config.prefix.length).split(/\s+/);
  const CommandName = args.shift().toLowerCase();```
#

idk how to do it anymore with a mention though

#

since the "prefix" could have a space in it I don't wanna use split

#

try args[1] ?

#

idfk lmao

sick cloud
#

if you don't know, don't waste space and send nonsense

earnest phoenix
#

Sorry

#

GWjiangoNegaLUL hai tony

sick cloud
#

wrong channel, but hi

still ruin
#

Who test My Bot?

sick cloud
#

@still ruin?

still ruin
#

i Create a Bot ;-;

night imp
#

Cool!

#

I recommend watching some tutorial videos on youtube and hope to see the finished product on the list soon!

#

If you have any problems/questions that aren't easily searchable you can post them here and we'll help

still ruin
#

Bye guys I'm going to have to leave because at night I'm from Brazil I do not know if my bot is working

tidal parrot
#

anyone here good with datadog?

earnest phoenix
#

i use rollbar, much easier

#

and freemium

#

freemium in a good way, because you can log up to 5,000 different errors each month

tidal parrot
#

datadog is so confusing

#

im just tryna figure this out

earnest phoenix
tidal parrot
#

hmmmmmmm

#

that looks more like error monitoring

#

not quite the same thing

#

like yeah its a part of datadog but datadog has more ig

cold niche
#

For error logging use Sentry πŸ‘Œ

#

It is extremely cool, useful and easy to implement

#

If you are a student, there is an 500k request per month limit or something but you can even host your own instance

earnest phoenix
#

Hello, would any of you be willing to help me make the below code print out a users role when the write out a command?

#
@client.command(pass_context=True)
async def login(ctx, email="None", member: discord.Member="None"):
    author = ctx.message.author.id

    print(discord.Member.roles)
cold niche
#

Uhh, that's not the way you should do it

#

ctx.message.author is a discord.Member object if you execute the command in a guild

#

So ctx.message.author.roles will be a list of all your member's roles

#

Do you use the async or the rewrite branch tho? @earnest phoenix

earnest phoenix
#

Okay so then if I were to then run role = discord.utils.get(member.server.roles, name="Captain") do I modify the member.server.roles?

#

@cold niche I use async

cold niche
#

since utils.get literally just iterates over the given iterable and tries to find out a matching object with the given property it won't modify anything πŸ˜„

earnest phoenix
#

Okay I I changed it to what you said of ctx.message.author.roles and got [<discord.role.Role object at 0x00000255E1B8FB10>]

cold niche
#

That's what you wanted I think

#

It is the role object

#

You can do whatever you want with it

earnest phoenix
#

Okay ig I dint know what I was getting lol.

#

Okay thank you so much for the help

cold niche
#

Np

#

BTW you might be interested in joining to the d.py guild directly

earnest phoenix
#

I have one more question actually

cold niche
#

Ask away

earnest phoenix
#

When I run this: role = discord.utils.get(member.server.roles, name="Captain")

#

I get that member is not defined

cold niche
#

Yeah

#

ctx.server.roles

#

Oh wait

#

Nvm that's a var

#

Why do you define it to "None"?

#

By default

earnest phoenix
#

For discord member? Iv completely removed that part now.

cold niche
#

Remove that and just do async def login(ctx, email: str, member: discord.Member)

But I am not familiar with the old async branch's capabilities that's why I'd recommend asking that in the discord.py guild

earnest phoenix
#

Okay Ill try that thank you

pale marsh
#

@tidal parrot found any alternative to datadog?

tidal parrot
#

Melmsie helped me out with it

#

I'm already using datadog I just couldn't figure out how to do smth

restive silo
#

a good alternative is prometheus + grafana

wild tide
#

Is it possible to edit a message by message ID in discord.js?

true smelt
wild tide
#

ah thank you

worn hull
#

who wanna make a bot with me?

neon swift
#

nobody

toxic oracle
#

is there a way to get a bots stats on dbl via its name?

#

or is there atleast a way to get the id from its name, to put into dbl

split lantern
#

Well u can shearch all known users to your bot

wild tide
#

wat

jagged plume
#

you used to be able to search bots through the api

#

not sure if its still there since i havent used it in a while

pale marsh
#

It is

jagged plume
#

if not just use the api to get the bot through it's ID and you'll get a response with stats included

runic grotto
#

is it possible to detect one word in a complete sentence with discord js ?

pale marsh
#

I would assume so, and it wouldn’t have anything to do with d.js

jagged plume
#

what do you mean by detect

runic grotto
#

for exemple

#

detect an insult in a sentence

dense needle
#

anyone using discord py here

jagged plume
#

the easiest way to do it is to use the split function on the message content to split the spaces and then check each word

#

or you could use indexOf

runic grotto
#

thanks i'll see what i can do

floral zinc
#

earth split is ineffective. Just type blaINSULT and its tricked

runic grotto
#

i don't understand blaINSULT

dense needle
#

Is it better to use command ext in python or on_message

floral zinc
#

Xen just do the indexOf

runic grotto
#

ok

craggy roost
#

Hey everyone.

#

Is there anyone there?

wild tide
#

defaultChannel() has been deprecated. Check out the discord.js documentation https://discord.js.org/

craggy roost
#

Ok. Thanks

#

How do I post a default channel?

wild tide
#
let defaultChannel = "";
guild.channels.forEach((channel) => {
  if(channel.type == "text" && defaultChannel == "") {
    if(channel.permissionsFor(guild.me).has("SEND_MESSAGES")) {
      defaultChannel = channel;
    }
  }
})``` try this πŸ˜ƒ
craggy roost
#

ok. trying

#

Does this code line not only find the default channel?

wild tide
#

it just finds the first channel it can send a message in

craggy roost
#

I assume that the default channel is the first channeling

wild tide
#

well, no

craggy roost
#

So if the position is changed?

wild tide
#

it doesn't matter.

#

it's permission based

craggy roost
#

Hmm.

#

I understand

wild tide
#
defaultChannel.send("message")```

this is how you would send the message into the default channel
craggy roost
#

Ok. Thank you πŸ‘Œ

wild tide
#

yw

craggy roost
#

@wild tide

#

Not working

#

Samcool?

#

Who can help me?

gleaming glen
#

you didn't put the code that he sent

craggy roost
#

Oh bir TΓΌrk

#

eren TΓΌrkΓ§e konusur musun lΓΌtfen

gleaming glen
#

actually you did nvm

craggy roost
#

Δ°Γ§im daraldΔ± translateden

gleaming glen
wild tide
#

@craggy roost put the defaultChannel.send outside of the brackets

#

but keep it in the module.exports

jagged plume
#

I know that split is ineffective. Filters in general are ineffective, they can all be bypassed one way or another

#

Thats why I said "the easiest way"

#

I didn't say it was the only way.

craggy roost
#

@wild tide Ok. Trying

jagged plume
#

that code is extremely ineffecient

#

why don't you just filter the channels?

gleaming glen
#

yeah

jagged plume
#
guild.channels.filter(c => c.type == "text" && c.permissionsFor(guild.me).has("SEND_MESSAGES"))[0].sendMessage("a");
#

untested but im sure that would work

craggy roost
#

trying

austere meadow
#

if you're using v12 it'd be pretty neat if you used extenders to actually reimplement the defaultChannel function(?) with that code

craggy roost
#

How so?

austere meadow
#

it's a pretty complicated thing, i was only suggesting the idea of it if you're more experienced with discord.js

#

if you really want to know i can tell you

#

it uses classes

#
const { Structures } = require("discord.js");

module.exports = Structures.extend("Guild", DiscordGuild => {
  return class Guild extends DiscordGuild {

    constructor(...args) {
      super(...args);
    }

     get defaultChannel() {
    //your code here
     }
}

that's one example of an extender

heady zinc
#

thomas is still on d.js v10 thonk

craggy roost
#

These things have just begun. Learning has yet to take place.

austere meadow
#

@heady zinc lmfao ikr i was gonna say sendMessage has been deprecated for ages

#

and ah okay

#

yeah extenders are definitely more advanced things

heady zinc
#

also im psure filter returns a collection on v11

#

and not an array

#

like wow

austere meadow
#

eris returns an array

#

but yeah d.js returns a collection

heady zinc
#

yeah thomas is just using v10 bloblul

floral zinc
#

What exactly is the default channel? I know you can set it but what is it for?

austere meadow
#

its an old thing that discord used to have, where #general used to be the "default channel"
basically the very first channel that was created when your guild was created

#

its since been deprecated and there is no default channel anymore

floral zinc
#

Ahh okay, thanks

austere meadow
#

πŸ‘

floral zinc
#

πŸ‰

jagged plume
#

no

#

i haven't used discord.js in forever

#

i've been using eris, hence the array and why i said it was untested lol

#

i personally don't like using discord.js as it is right now Β―_(ツ)_/Β―

craggy roost
#

Could you throw me a guildMemberAdd instance?

jagged plume
#

what do you mean

#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ guildMemberAdd instance

craggy roost
#

I'm using translate. Did I type it wrong

jagged plume
#

What do you mean guildMemberAdd instance?

#

are you asking for an example or ..?

craggy roost
#

yes

#

example. I think

jagged plume
#
<Client>.on("guildMemberAdd", (member) => {

});
#

thats how you would implement it

#

wait let me check discord.js docs i dont wanna be double wrong

craggy roost
#

Ok.

jagged plume
#

yeah thats right

craggy roost
earnest phoenix
#

but how do i make it do x y z

jagged plume
#

shh they're trying

#

is there an error

heady zinc
#

oh you got me interested, @jagged plume what isn't to your likings in the current d.js lurk

craggy roost
#

I think so. So the console is in grade but not working

jagged plume
#

oh i see the issue

#

i think

#

@heady zinc sharding is trasshh

earnest phoenix
#

I think what hes doing is reading a json with greeting channel and seending the member join message

jagged plume
#

like actual shit

austere meadow
#

i can vouch

jagged plume
#

40k servers with discord.js sharding was a pain in the ass

#

swapped to eris, problems went away

craggy roost
#

@earnest phoenix Yes

earnest phoenix
#

but the let is out of scope of sending the message, and hes looking for a channel with the member ID Thonk

heady zinc
#

eris's sharding won't scale much either tho

earnest phoenix
#

eris sharding works great

jagged plume
#

it's still better than discord.js'

earnest phoenix
#

clustering with internal+external sharding

#

aka the perfect balance

jagged plume
#

i'm now using eris-sharder package, it's nice

heady zinc
#

i mean yeah d.js's internal sharding isn't yet nice

#

oh yeah with eris-sharder it'll just scale nicely oktrump

austere meadow
#

if you tried to run like 300k servers on discord.js it just wouldn't happen

earnest phoenix
#

stats tickYes clustering tickYes no crazy memleaks tickYes must be eris + eris-sharder

jagged plume
#

watching my server explode if that happened

#

like there would be actual fire

heady zinc
#

though eris-sharder's dev doesn't do shit

jagged plume
#

tru

earnest phoenix
#

forking GWfroggyWeSmart

jagged plume
#

but it works fine and i've been editing the source myself

#

yeah

heady zinc
#

why forking when you can pr

earnest phoenix
#

helpign others OMEGALUL

jagged plume
#

open source projects

earnest phoenix
#

SHHH

craggy roost
#

Ok, It's working. Now

earnest phoenix
#

Okay, I think this is right... However im in a bit of a pickle at the moment as I dont know how it would know what parameter to use to get the users ID. The Function will be called everytime something involves a definable user.

function newrow(message, member, oldMember, newMember) {
sql.run("CREATE TABLE IF NOT EXISTS userConfig (userID INTEGER, isPremium TEXT, isNitro TEXT, embedColour TEXT, personalPrefix TEXT)").then(() => {
sql.run("INSERT INTO userConfig (userID, isPremium, isNitro, embedColour, personalPrefix) VALUES (?, ?, ?, ?, ?)", [???.id, "False", "False", "70606", "g!!"]);
}).catch(console.error);
}

Where it says ???.id, How would I set that so it works no matter what event it is called from?

#

Anyone please?

#

@earnest phoenix Would you be kind to help meh? πŸ˜‚

#

plez

gilded blaze
#

Just use the message object

#

message.author.id

earnest phoenix
#

^^

quartz kindle
#

i think he wants to re-use this function for other reasons

earnest phoenix
#

Yes

quartz kindle
#

so its not always related to message

#

in that case, one of the member variables

#

will probably contain what you want to put into the db

earnest phoenix
#

OK idk the overhead of checking if a table exists, but you should probably do that once on startup

#

Its goign to be called from:
guildMemberUpdate (OldMember, NewMember)
message (Message)
etc

#

I dont know which one would work for all the events I need

latent heron
#

wdym if a table exists

earnest phoenix
#

?

latent heron
#

as in a variable array has data in it?

gilded blaze
#

member.user.id

earnest phoenix
#

So would that work if its called from any other event?

gilded blaze
#

If message.author is undefined then check member.

#

If both is undefined log it.

earnest phoenix
#

Beefy, what is stored in userconfigs, do you wanna update their username or something if they change it?

#

No

#

Everytime something involves a definable user. If they do not have a row in the db, it creates it. This includes events such as: guildMemberUpdate, guildMemberAdd etc

#

ok so when is the data used outside of those events?

quartz kindle
#

you have to think ahead about all possible use case scenarios you want to use that function in

earnest phoenix
#

It will be used through out the whole of the code

#

mhm

quartz kindle
#

you dont really need to have 4 variables in the function

gilded blaze
#

That's not what he means.

earnest phoenix
#

Yes. The whole code will be SELECTED

#

i mean my getprofile() method creates their profile if they actually use it

#

i mean think about how many redundant userconfigs ur gonna have

quartz kindle
#

you just need to have one member, and then you prepare it before the function is called

gilded blaze
#

In fact he only needs one variable.

quartz kindle
#

exactly

latent heron
#

this is why JS is such a controversial programming lang πŸ˜‚

quartz kindle
#

its not lmao

earnest phoenix
#

ah so let member = message.author if its in the message event, let member = newMember.member if its in the guildMemberUpdate event?

quartz kindle
#

exactly

#

and then function(member)

earnest phoenix
#

Right, I gotcha, thanks

#

Yea

#

Thanks for that

#

Can I use a different name for it or does it have to stay as member

latent heron
#

member is a variable you are making

earnest phoenix
#

Okay

latent heron
#

why would it need to stay as it

earnest phoenix
#

you could name it potato if u rly want

#

Aight imma name it memberDef then

#

πŸ˜‚

latent heron
#

member is just a convenient name because it is just the purpose of it

quartz kindle
#

let pothead = message.author

#

function(pothead)

latent heron
#

let uid = message.author.id

quartz kindle
#

also, you can change the variable name in the function itself

latent heron
#
let beefy = message.content
function(beefy)```
#

😎

quartz kindle
#
functionname(pothead) //input

function functionname(noob) {
    console.log(noob)
}//will output the content of pothead```
earnest phoenix
#

i think u should stil consider what i said before about creating redundant profiles btw

sick cloud
#

i just wipe out users that haven't used my bot in a month

earnest phoenix
#

How does one call to a function? Do you have to use .then(function(.....))

#

just dont create a profile until they send a message at least

latent heron
#

why not create when they join server

earnest phoenix
#

Thats what im doing

#

But what if bot is offline tho?

#

Then what πŸ˜›

#

because they may never speak, and he doesnt count points, levels, etc

latent heron
#

if the bot is offline

earnest phoenix
#

the only thing that matters is personal prefix/embed color

latent heron
#

it can't do anything

#

simple

earnest phoenix
#

so just make that on their first msg

#

not really, more perks enable if the isPremium and isNitro equal true

#

perks that they get by never sending a message?

#

i assume they need to send a command for it to matter

#

They get them by supporting the bot on patreon

lament meteor
#

isNitro how u do that?

earnest phoenix
#

Not that type of nitro lol

lament meteor
#

ooo

sick cloud
#

check avatar

lament meteor
#

custom nitro

earnest phoenix
#

Not discord nitro

#

Yes

lament meteor
#

@sick cloud tbh thats the only way rn

earnest phoenix
#

Anyway, how would I call to the function? πŸ˜‚

lament meteor
#

but i presume there is other ways

#

maybe verify with emoji

knotty steeple
#

what if someone is nitro and they dont have a gif avatar

latent heron
#

it still checks for the nitro feature

sick cloud
#

@lament meteor there's one other way

#

@knotty steeple

latent heron
#

like the tag

lament meteor
#

@earnest phoenix dats the issue

#

oops

#

wrong tag

earnest phoenix
#

rip

latent heron
sick cloud
#

you can get a user to react with a custom emoji in dms

#

no

#

bots can't do that

earnest phoenix
#

well its up to you beefy but if you keep doing it your way on every bot restart ur gonna have to check every member of every guild and check if they are in the db

#

so have fun

latent heron
#

bots can't check for nitro?

sick cloud
#

no

lament meteor
#

@sick cloud smart

#

@latent heron no

latent heron
#

that's dumb

sick cloud
#

not well at least

lament meteor
#

kinda

earnest phoenix
#

not doing it only when they NEED it is your choice πŸ˜‚

latent heron
#

think of all the premium commands you could add just for nitro people

#

it would boost prices

sick cloud
#

users have a premium property but it's always set as null

lament meteor
#

well what is knowing if a user hv nitro for?

sick cloud
#

@latent heron it's possible

latent heron
#

if Mee6 tomorrow added really cool ass nitro commands like

sick cloud
#

but just hard to do

latent heron
#

Discord stocks go through the roof πŸ˜…

#

yeah

lament meteor
#

oo Tony u mean a custom emote verifier? in dms

latent heron
#

I can only see checking the icon as the only way sufficient

earnest phoenix
#

would be useless, since athen there would be black market for hiring nitro users

latent heron
#

besides

lament meteor
#

but wat if nitro expire?

earnest phoenix
#

like "pay me $1 ill use nitro commands in dyno for you"

latent heron
#

isNSFW functions in discord libs are checking for "nsfw" in the channel name and if the NSFW permission is enabled

#

nah

#

Mee6 is a customizable bot as well as some moderation stuff

sick cloud
#

shrug

latent heron
#

so if you needed Nitro for certain banners, badges, etc.

#

it could benefit Discord in several ways

sick cloud
#

i'm going to bed soon, so idk what to say

latent heron
#

Besides

lament meteor
#

bye Tony

latent heron
#

you can pay bot devs for premium commands already

#

why haven't people paid others to abuse that yet?

lament meteor
#

idk

earnest phoenix
#

@jolly zephyr

sick cloud
#

meme6

#

meem6

gleaming glen
#

is there is a good host which has windows as os

uncut slate
#

why would you want windows as an OS on a cloud machine

gleaming glen
#

eh

#

cause i can check it with remote desktop in my phone as well

uncut slate
#

you can SSH from your phone

gleaming glen
#

am i?

#

with what

uncut slate
#

depends on which OS your phone runs, JuiceSSH is pretty great on android

gleaming glen
#

is there something good for ios

uncut slate
#

just look for ssh on the app store

gleaming glen
#

i found something called termius

#

looks good

#

and ratings look good as well

#

thx

#

and should i prefer debian or centos?

uncut slate
#

I'd personally recommend debian, but you're probably better off just doing your own research

ancient iris
#

Hi

gleaming glen
#

i used debian before as well, im just gonna choose debian

neon swift
#

Debian? That's a funny way to spell arch

quartz kindle
#

arch? thats a funny way to spell tiny core linux

latent heron
#

tiny core linux? thats a funny way to spell windows vista

quasi marsh
#

Now move it

eager spoke
#

also nitro stuff isn't possible since Discord doesn't provide a method to know if a user is a Nitro user

zealous veldt
#

Unless you use a user account

#

Or could you use OAuth?

cerulean zinc
#

Do people often vote lock NSFW commands or no

topaz fjord
#

@cerulean zinc they do

cerulean zinc
#

Thats what I thought

latent heron
#

I don't see the problem behind votelocking an NSFW command or commands

topaz fjord
#

wdym

#

you dont see why people do it? @latent heron

latent heron
#

i know why it's done

#

i just don't get why it's a bad thing to do

earnest phoenix
#

lock commands to votes = more servers because you get higher listed

topaz fjord
#

i think they just dont want the bot to become vote to use

quartz kindle
#

votelocking = freemium games

#

its annoying af, but it works

cerulean zinc
#

Im only really locking the NSFW commands

earnest phoenix
#

i lock playlists

quartz kindle
#

i dont lock anything :3

topaz fjord
#

im locking user playlists

#

where they get to add songs to their own

earnest phoenix
#

oops im autistic

latent heron
#

tessst

slate kayak
#

@knotty steeple

knotty steeple
#

why did you ping me

slate kayak
#

because i know you could help me sorry 😦

earnest phoenix
#

how do you shard a bot?

gleaming glen
#

just google it

#

with your lib

earnest phoenix
#

ok

knotty steeple
#

@slate kayak when people can help they will help

loud salmon
#

Is more than 50 bots in a server a good measure of whether or not my bot joined a bot farm?

night imp
#

Hello, I am making an upgrade to my bot that requires one more piece of data added to the guild table. However, it is sending me this error when I try to enter the new values

SqliteError: table guilds has 4 columns but 5 values were supplied

How would I fix this?

#

/ migrate the data

earnest phoenix
#

how do you put custom animated emoji in a discord bot

night imp
#

upload it to a server and reference it

#

example

earnest phoenix
#

waht if i dont have nitro?

night imp
#

then have someone else do it I guess

earnest phoenix
#

i mean like in an embed

floral zinc
#

You can upload animated emojis without nitro

wild hill
#

how?

floral zinc
#

Just upload emoji and select a gif?

ruby dust
#

you only need to put the full emote mention: PartyWumpus !PartyWumpus

floral zinc
#

Funny you

#

You cant without nitro

ruby dust
#

get your bot to get that information?

floral zinc
#

Yes i know

#

I know how to do it

ruby dust
#

if you are a dev you will always have ideas how to do it

floral zinc
#

I already did it but i wasnt that far because he wanted to know how to upload it :p

ruby dust
#

yeah but I was answering to Nut

leaden wharf
#

im strugiling to create my own bot would someone offer to help please?

earnest phoenix
#

how do you make your bot send an animated emojis?

slender thistle
#

Deivedux answered that already

earnest phoenix
#

hmmm

#

ahhhh

earnest phoenix
#

hey @ruby dust can my bot send it when i dont have nitro?

#

and also

#

would it work in an embed

ruby dust
#

bots don't have any affiliation with sharing nitro with it's owner, but bot accounts do have access to every nitro perk specific to emotes

earnest phoenix
#

cuz i cant seem to get it to work

#

you need to do <:emoji:id> or likely

#

with animated emojis you have to do this <a:name:id>

#

can i put in ``

#

well if you copy link of emoji (w10 right click) you get the id tho

#

anyway

#

you know how to do now so 🀷

#

i know how to get the id XD

#

yeye

ruby dust
#

all I'm saying is that you need to put the full emote mention into the message

#

![typing](https://cdn.discordapp.com/emojis/439643745021984769.webp?size=128 "typing"): typing

earnest phoenix
#

i did this

:plexiOnline:__**Play:**__ Plays any music
#

o

#

well

#

its the id also

#

and the name

#

<a: name : id>?

#

i did

#

oki

#

well make sure bot is in the server with it tho

#

or not idk

#

it is

#

does it work?

#

no

#

wait

#

let me check

#

yea

#

it just says :name:

#

instead of the emoji

#

rip

ruby dust
#

you are not doing something right

earnest phoenix
#

I gwuess you have to ask someone else :(

ruby dust
#

if you'd somehow send me an invite to the server where that emote belongs to without sending me it in dms Thonk

earnest phoenix
#

no clue how

ruby dust
#

I'll friend you temporarily

earnest phoenix
#

sure

floral zinc
#

Ay where is your text yellow?

#

Make sure the bot is in the guild where the emoji is and make sure the bot has permission "Use external emojis" and make sure you got the right id

tardy hatch
#

Guys, how to make an eval command? (Python async)

onyx summit
ruby dust
#

in python, how would I be writing into a text file if it's opened in w+b mode? cause I'm keep getting this errorTypeError: sequence item 0: expected a bytes-like object, str found

#

even though I add the b prefix before the string, it should technically turn it into bytes right?

earnest phoenix
#

how do you fix the 14 day old message to delete situation?

ruby dust
#

"fix"?

#

why do you think it's broken?

turbid gale
#

try bytearray()

earnest phoenix
#

not fix

#

but like is there any way to avoid that?

ruby dust
#

2 week old message thing only limits out bulk-deleting, but it won't affect if you'll delete each message one-by-one, which is a non-recommended method due to ratelimits

earnest phoenix
#

ok

latent heron
#

does anyone know how to check when a user created their discord account with discord.py

viscid falcon
#

how do you get the emoji id?

latent heron
#

wdym

#

depends on whether or not the emoji is custom or built in

viscid falcon
#

non custom

#

so one of the defualts

latent heron
#

i never tried

#

why do you need an emoji id

#

I know how to do it but if you are talking about coding it

#

no clue

#

\:emoji:

#

do that

#

and you will get this id

viscid falcon
#

thats unicode though

latent heron
#

yeah

#

that

#

is the only code also

#

πŸ˜‚

#

\πŸ“

#

πŸ“

viscid falcon
#

but i need the id to put in an url, i dont want to do the unicode emoji

latent heron
#

i don't know any other ways because unicode emoji's

#

you are on your own in that case because it is the only way i know for non-custom emojis

viscid falcon
#

well, thanks for trying

latent heron
#

gl

sick cloud
#

unicode don't have ids

latent heron
#

i dont think theres another way besides getting unicode

#

besides checking for the string name of the emoji

#

which is not ID

viscid falcon
#

ok, let me try explaining what im trying to do, im trying to make a command that makes an emoji apear bigger, and i think the easiest way to do that is by getting the url

latent heron
#

oh

#

what programming lang you in

viscid falcon
#

js

latent heron
#

nvm

cerulean zinc
#

@viscid falcon Its on the DJS docs

viscid falcon
#

.url didnt work for me, what would be the syntax for it?

#

@cerulean zinc

#

rn i have it as args[0].url

night imp
#

should be url

#

can you check what args[0] is

viscid falcon
#

args[0] is the first user argument, but when i use that command it gives me the error Cannot send an empty message

night imp
#

Log it

#

And user or emoji?

quartz kindle
#

where are you getting the emoji from? is it a custom emoji or a default one?

viscid falcon
#

its a defualt one

quartz kindle
#

from message.content?