#development
1 messages Β· Page 462 of 1
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">✕</div> <div class = "option" id = "maximize">☐</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;
}```
@quiet bobcat hi i like what ur going for but i cantsee much of a problem
Hello
hey everyone! I can't create a "select report channel" command. Who can help me?
@earnest phoenix i cant resize the window from the top bar
Know how to fix it?
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
alright
so you created the BrowserWindow with frame: false?
and then used your header instead of the native frame?
yes
lemme mess around with an app I did the same thing with
alright
You can cheat like Discord does
how?
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
mhmm, lemme know if that works out for you then!
P.S: I tried it on my application, and it works
mhm
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
you can read #460037222331187200
my certification took 9 days, but i've seen some that took months
well my certif(which got denied) took a month
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)
@gleaming glen thanks!
well you learn something everyday
Hey everyone! How do we get the server to receive the invitation link if we have a bot?
https://discordapp.com/oauth2/authorize?=&client_id=YOURBOTID&permissions=YOURBOTPERMISSIONS&scope=bot
you want the bot to get the invite link for a server?
@knotty steeple yes
discord.js
ok wait a sec
ok.
you need a channel id btw
default channel id?
https://glitch.com/edit/#!/fir-camp can someone proof read this and explain why it wont go live on my Bot Testing server
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
Will not the new invitation then create a link? Does it mean trouble for the server owner?
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
My bot is have this permission
so then just follow what i told you
Hmm
thats just the code btw (the thing after https://discord.gg/)
@onyx hare there is nothing about discord in your bot
Anyone please?
loop it
also, your habbo token is public there, you should remove it
Yeah... How? π
@knotty steeple Ok. Thanks.
Pls
well you can just google javascript loops
π€ what parts are needed to make discord on there
for (i=want; too>69; die++;){}
thats not valid wew
This is why I need intelisense
want is undefined, too is undefined, unexpected ";" on line 1
I tried
Iβm a very slow learner
@earnest phoenix this is how you would do a loop
then u just put your code in place of // do stuff
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 ?
guildCreate
^
ok I'll try thanks
Make sure to replace msg with guild unless you're crazy
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?
what did u do
this thing
i made background black
so created by is not visible
but for some reason i can't change the color of it
in the then you have to send the message
How do I send this to embed?
let want, to = 69;
for (i = want; to < die; i++) {
 
}```
so everyone is ignoring me 
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 
i said
css?
yes
<style> and stuff like that
im just asking how can i change the createdby text's color
i did change others
but i cannot change that for some reason
let davetlinki = msg.guild.channels.get(msg.channel.id).createInvite().then(invite => ... ?
SyntaxError: missing ) after argument list
u need {} 
I'm using translate
you can remove let davetlinki = also
Same
i mean that wont work since the embed is out of scope of sending it
and the syntax is wrong anyway
Could you make an example? I do not understand this.
here is one i found on google https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
I mean, I do not understand exactly. Now what am I supposed to do?
just read what tom sent
(param1, param2, β¦, paramN) => { statements }
(param1, param2, β¦, paramN) => expression
first example
I mean, do I have a fancy bracket?
then(invite =>
let srembed = new Discord.RichEmbed()
.setTitle("Sunucu Reklam")
.setColor(ayarlar.renk)
.addField("Link",invite.url)
);

π nice π
π Thank you
none responded to me
And Thank you @knotty steeple
π
@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
So you want to be deleted after you write the command?
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
π
@knotty steeple u still searching for how to search for mentions?
Regex
Yeah or that
i can just concatenate an emoji with a string to get the emoji right? (D.js)
not rlly sure wat ur asking but it sounds like u can
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);
}```
Queue is undefined
^
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?
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
I need to check if the argument passed in the command is a member object
but don't default to it
isinstance(object, discord.Member) but dunno if the object would return a string somayb a try except get_user()tm
...what did I just say?
Oh
I don't need to default to the member object
I think
I need to be able to do it manually
Wait a sec
(ctx, arg) and you need to check for isinstance
You sadly need to do it manually
MemberConverter?
Friends. How can I do it unlimited while the bot is creating a channel-invite link?
Can you expose the GC with pm2 (node.js)
This is my server add command https://hastebin.com/etiguzidoc.js
This command creates a 24-hours invitation link. How can I make this unlimited?
Is there anyone there?
Np have fun coding
u2
HEllo
Hi!
what commands?
.commands
wdym?
@neat falcon
what do you mean?
i need help for code
you haven't said what exact code
basically when the founder does .roleplay [@User] the bot creates and adds the Roleplay role
@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)
and to add this to a menitioned member
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
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
Anyone please? lol
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
i have an example
Would you be willing to show me that fine example? π
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
Oh lord. I use YouTube Data API to get my info
i think i have an example without ytdl-getinfo but idk
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';
})
does discord tos even allow that? it seems like there would be problems with privacy
._.
Bot'd have to create a new invite every time you use that, which is not very good
kinda spammy
:l
Wouldnt that be inv scraping?
privacy issues
once a bot did that on my private server and i was very angeryboye
lol
cc @indigo notch 
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
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);
});
With glitch.com, how do you get a bot to join a vc
How does with glitch.com change anything>
This is gonna sound weird to you guys
But how do I go about the process of creating shards
depends on your library
library?
as in the discord lib made for programming langs? in this case it is discord.py
danke
Any good ideas for commands? I just need some inspiration
Not a bad idea
anybody here thats good with discord.js ?
just ask your question
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
You forgot braces after guildMemberAdd I think
Also you hooked up to the same event twice
you dont need 2 guildMemberAdd events
also you forgot to end the first one with });
http://prntscr.com/ki71cf this is the new one
I think what youβre looking for is guildMemberDelete or something similar. Idk d.js though
You forgot 2 brackets after the braces
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 π’
well this is basic things
There are also 2 extra braces π
In the two return lines, remove the { at the end
And add a ;
π’ i have been working 3 days non stop on this bot and really want it to work π’
yes
Can someone recommend me something like enmap (it should work)
sqlite
i was following a tut video and like i said it was working it was just when i have put in the second part π’
http://prntscr.com/ki73mb thats must be much better i hope π¦
nah I mean something nearly as easy
sqlite is easy
but not as easy as enmap right?
@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
http://prntscr.com/ki793r awsome thank you @pale marsh i own you much love π
its working again yes yes yes thank you @pale marsh
Lmao no problem
Also youβre still hooking to the same event twice smh
@slate kayak
what do you meen? sorry for asking ?
yes
thank you π i did change it now
plus channel.return isn't athing
ok what must it be ?
channel.send
no
@slate kayak send a screenshot of the whole code again
okay fuck my bot
Looks nice
c
d
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)
are you on rewrite?
No im trying to run it just on command
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.
wut
that blue upvote thingy, dropping to 0 or 1 lol
but this number staying the same or increasing
The blue button is monthly, but on your page it's total of all time
Ah i see. Yeah all those bots are less than a month old I believe. So that would explain it, thanks!
how do you create a database with mysql
create database <database name>;
how can I get data from the dbl API on a website without CORS freaking out?
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?
damn, okay. its just the guild count
You could let your bot set guild count in a database and load that value on your website
ill have a look, thanks
is there any reason not to get the data live on the server side? that should work right?
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
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
You could use a template engine like pug or jinja2
yeah thats probably what ill stick to just due to ease. thanks π
Is there a piece of JS code that displays the version of your Node?
process.version
Cheers
it is not
for me its discord.__version__
that's not your node version
yes
ah
does it include the v? or would I do v${process.version}?
thats also __version__
it includes the v
I want it to display v8.11.3
just use process.version
Ik does it include the v also? lol
aetheryx told you already
Ah, never seen the message. Sorry
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 :/
@earnest phoenix process.platform
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
if you don't know, don't waste space and send nonsense
wrong channel, but hi
Who test My Bot?
@still ruin?
i Create a Bot ;-;
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
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

anyone here good with datadog?
i use rollbar, much easier
and freemium
freemium in a good way, because you can log up to 5,000 different errors each month
https://rollbar.com is really easy
hmmmmmmm
that looks more like error monitoring
not quite the same thing
like yeah its a part of datadog but datadog has more ig
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
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)
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
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
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 π
Okay I I changed it to what you said of ctx.message.author.roles and got [<discord.role.Role object at 0x00000255E1B8FB10>]
That's what you wanted I think
It is the role object
You can do whatever you want with it
I have one more question actually
Ask away
When I run this: role = discord.utils.get(member.server.roles, name="Captain")
I get that member is not defined
Yeah
ctx.server.roles
Oh wait
Nvm that's a var
Why do you define it to "None"?
By default
For discord member? Iv completely removed that part now.
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
Okay Ill try that thank you
@tidal parrot found any alternative to datadog?
Melmsie helped me out with it
I'm already using datadog I just couldn't figure out how to do smth
a good alternative is prometheus + grafana
Is it possible to edit a message by message ID in discord.js?
ah thank you
who wanna make a bot with me?
nobody
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
Well u can shearch all known users to your bot
wat
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
It is
if not just use the api to get the bot through it's ID and you'll get a response with stats included
is it possible to detect one word in a complete sentence with discord js ?
I would assume so, and it wouldnβt have anything to do with d.js
what do you mean by detect
anyone using discord py here
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
thanks i'll see what i can do
earth split is ineffective. Just type blaINSULT and its tricked
i don't understand blaINSULT
Is it better to use command ext in python or on_message
Xen just do the indexOf
ok
Hey everyone.
https://hastebin.com/ecapubolaf.js this is not work. Where is the error?
Is there anyone there?
defaultChannel() has been deprecated. Check out the discord.js documentation https://discord.js.org/
let defaultChannel = "";
guild.channels.forEach((channel) => {
if(channel.type == "text" && defaultChannel == "") {
if(channel.permissionsFor(guild.me).has("SEND_MESSAGES")) {
defaultChannel = channel;
}
}
})``` try this π
it just finds the first channel it can send a message in
I assume that the default channel is the first channeling
well, no
So if the position is changed?
defaultChannel.send("message")```
this is how you would send the message into the default channel
Ok. Thank you π
yw
you didn't put the code that he sent
actually you did nvm
Δ°Γ§im daraldΔ± translateden
come #memes-and-media
@craggy roost put the defaultChannel.send outside of the brackets
but keep it in the module.exports
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.
@wild tide Ok. Trying
guild.channels.filter(c => c.type == "text" && c.permissionsFor(guild.me).has("SEND_MESSAGES"))[0].sendMessage("a");
untested but im sure that would work
trying
if you're using v12 it'd be pretty neat if you used extenders to actually reimplement the defaultChannel function(?) with that code
How so?
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
thomas is still on d.js v10 
These things have just begun. Learning has yet to take place.
@heady zinc lmfao ikr i was gonna say sendMessage has been deprecated for ages
and ah okay
yeah extenders are definitely more advanced things
yeah thomas is just using v10 
What exactly is the default channel? I know you can set it but what is it for?
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
Ahh okay, thanks
π
π
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 Β―_(γ)_/Β―
Could you throw me a guildMemberAdd instance?
I'm using translate. Did I type it wrong
<Client>.on("guildMemberAdd", (member) => {
});
thats how you would implement it
wait let me check discord.js docs i dont wanna be double wrong
Ok.
yeah thats right
This is my guildMemberAdd. But something is wrong https://hastebin.com/yenazenela.js
but how do i make it do x y z
oh you got me interested, @jagged plume what isn't to your likings in the current d.js 
I think so. So the console is in grade but not working
I think what hes doing is reading a json with greeting channel and seending the member join message
like actual shit
i can vouch
40k servers with discord.js sharding was a pain in the ass
swapped to eris, problems went away
@earnest phoenix Yes
but the let is out of scope of sending the message, and hes looking for a channel with the member ID 
eris's sharding won't scale much either tho
eris sharding works great
it's still better than discord.js'
i'm now using eris-sharder package, it's nice
i mean yeah d.js's internal sharding isn't yet nice
oh yeah with eris-sharder it'll just scale nicely 
if you tried to run like 300k servers on discord.js it just wouldn't happen
stats
clustering
no crazy memleaks
must be eris + eris-sharder
though eris-sharder's dev doesn't do shit
tru
forking 
helpign others 
open source projects
SHHH
Ok, It's working. Now
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
^^
i think he wants to re-use this function for other reasons
Yes
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
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
wdym if a table exists
?
as in a variable array has data in it?
member.user.id
So would that work if its called from any other event?
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?
you have to think ahead about all possible use case scenarios you want to use that function in
you dont really need to have 4 variables in the function
That's not what he means.
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
you just need to have one member, and then you prepare it before the function is called
In fact he only needs one variable.
exactly
this is why JS is such a controversial programming lang π
its not lmao
ah so let member = message.author if its in the message event, let member = newMember.member if its in the guildMemberUpdate event?
Right, I gotcha, thanks
Yea
Thanks for that
Can I use a different name for it or does it have to stay as member
member is a variable you are making
Okay
why would it need to stay as it
member is just a convenient name because it is just the purpose of it
let uid = message.author.id
also, you can change the variable name in the function itself
functionname(pothead) //input
function functionname(noob) {
console.log(noob)
}//will output the content of pothead```
i think u should stil consider what i said before about creating redundant profiles btw
i just wipe out users that haven't used my bot in a month
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

why not create when they join server
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
if the bot is offline
the only thing that matters is personal prefix/embed color
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
isNitro how u do that?
Not that type of nitro lol
ooo
check avatar
custom nitro
@sick cloud tbh thats the only way rn
Anyway, how would I call to the function? π
what if someone is nitro and they dont have a gif avatar
it still checks for the nitro feature
like the tag
rip
i think it checks for the icon http://prntscr.com/kiilad
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
bots can't check for nitro?
no
that's dumb
not well at least
kinda
not doing it only when they NEED it is your choice π
think of all the premium commands you could add just for nitro people
it would boost prices
users have a premium property but it's always set as null
well what is knowing if a user hv nitro for?
@latent heron it's possible
if Mee6 tomorrow added really cool ass nitro commands like
but just hard to do
oo Tony u mean a custom emote verifier? in dms
I can only see checking the icon as the only way sufficient
would be useless, since athen there would be black market for hiring nitro users
besides
but wat if nitro expire?
like "pay me $1 ill use nitro commands in dyno for you"
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
shrug
so if you needed Nitro for certain banners, badges, etc.
it could benefit Discord in several ways
i'm going to bed soon, so idk what to say
Besides
bye Tony
you can pay bot devs for premium commands already
why haven't people paid others to abuse that yet?
idk
@jolly zephyr
is there is a good host which has windows as os
why would you want windows as an OS on a cloud machine
you can SSH from your phone
depends on which OS your phone runs, JuiceSSH is pretty great on android
is there something good for ios
just look for ssh on the app store
i found something called termius
looks good
and ratings look good as well
thx
and should i prefer debian or centos?
I'd personally recommend debian, but you're probably better off just doing your own research
Hi
i used debian before as well, im just gonna choose debian
Debian? That's a funny way to spell arch
arch? thats a funny way to spell tiny core linux
tiny core linux? thats a funny way to spell windows vista
also nitro stuff isn't possible since Discord doesn't provide a method to know if a user is a Nitro user
Do people often vote lock NSFW commands or no
@cerulean zinc they do
Thats what I thought
I don't see the problem behind votelocking an NSFW command or commands
lock commands to votes = more servers because you get higher listed
i think they just dont want the bot to become vote to use
Im only really locking the NSFW commands
i lock playlists
i dont lock anything :3
oops im autistic
tessst
why did you ping me
because i know you could help me sorry π¦
how do you shard a bot?
ok
Is more than 50 bots in a server a good measure of whether or not my bot joined a bot farm?
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
how do you put custom animated emoji in a discord bot
waht if i dont have nitro?
then have someone else do it I guess
i mean like in an embed
You can upload animated emojis without nitro
how?
Just upload emoji and select a gif?
you only need to put the full emote mention:
!PartyWumpus
get your bot to get that information?
if you are a dev you will always have ideas how to do it
I already did it but i wasnt that far because he wanted to know how to upload it :p
yeah but I was answering to Nut
im strugiling to create my own bot would someone offer to help please?
how do you make your bot send an animated emojis?
Deivedux answered that already
hey @ruby dust can my bot send it when i dont have nitro?
and also
would it work in an embed
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
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
all I'm saying is that you need to put the full emote mention into the message
: 
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
you are not doing something right
I gwuess you have to ask someone else :(
if you'd somehow send me an invite to the server where that emote belongs to without sending me it in dms 
no clue how
I'll friend you temporarily
sure
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
Guys, how to make an eval command? (Python async)
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?
how do you fix the 14 day old message to delete situation?
try bytearray()
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
ok
does anyone know how to check when a user created their discord account with discord.py
how do you get the emoji id?
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
thats unicode though
but i need the id to put in an url, i dont want to do the unicode emoji
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
well, thanks for trying
gl
unicode don't have ids
i dont think theres another way besides getting unicode
besides checking for the string name of the emoji
which is not ID
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
js
@viscid falcon Its on the DJS docs
.url didnt work for me, what would be the syntax for it?
@cerulean zinc
rn i have it as args[0].url
args[0] is the first user argument, but when i use that command it gives me the error Cannot send an empty message
where are you getting the emoji from? is it a custom emoji or a default one?
its a defualt one
from message.content?


hai tony


