#development
1 messages Β· Page 1099 of 1
|| instead of &&
ok
admin permission guarantees MANAGE_ROLES to be given so what's the point in checking for admin anyway
that doesnt change the issue tho
that doesnt matter
stop nagging on that
:(
this is the problem
when i mention a non role it does this
well check if its a role 
this is the problem
@mild flower Well
You typed in a command role lmao, not mentioned
so args[1] is a string
It has no id
Use !rperson.roles.cache.has(rmentioned.id)
k
only message.mentions.roles.first()
anyone have a bot idea that they need help making hmu i need something to do
Wouldn't all roles needa be cached
for that to work?
or are all roles cached as default?
Wouldn't all roles needa be cached
@misty sigil Then you need to type id and useawait message.guild.roles.fetch('id')
or are all roles cached as default?
@misty sigil idk
here is the current command
`` if(message.guild.roles.cache.has(rmentioned.id)) return message.channnel.send('Please choose a valid role');
^
TypeError: Cannot read property 'send' of undefined``
message.channel is undefined
anyways
anyone got docs on the new Discord.Client(); options?
anyone got docs on the new Discord.Client(); options?
@misty sigilhttps://discord.js.org/#/docs/main/stable/typedef/ClientOptions?
r.name== args.slice(1).join(" ")
ty
3 n
`` if(message.guild.roles.cache.has(rmentioned.id)) return message.channnel.send('Please choose a valid role');
^TypeError: Cannot read property 'send' of undefined``
@mild flower
Nnnnnnnnnnn
ejs 
How to seacrh music? Anyone can explain
Theres lot of modules can help you
Ouh okay tq
Is there a way to search text in strings only in VSC? I want to replace id with ID in all the strings my bot uses
I want to align a table to the center (html) but it's not moving
Is there a way to search text in strings only in VSC? I want to replace
idwithIDin all the strings my bot uses
@nocturne grove ctrl+ h
in strings only
so not the id in const channel = guild.channels.cache.get(id) for example
idk how to use regex and I don't know if that will work if you look for id inbetween ', as it can also be in between two strings then I think
Well you usually don't need to whip out regex
But if you do: https://regexr.com/
can someone help?
you're requiring a file that doesn't exist at that location
it does
check ur filepath is correct
thanks for that website but still a huge ? for me
can u show a screenshot which also shows the file where you are requiring ping.js
Hey quick question, what is the permission number for both administrator and audit log
fs.readdirSync("./commands/").forEach(dir => {
const commands = fs.readdirSync(`./commands/${dir}`).filter(file =>
file.endsWith(".js")
);```
?
I fixed it
@sinful belfry
But code looks nooby noe
anyone know how I can delete only one segment of the document mongodb
I just copy pasted it to .then
@violet nimbus where is the file that that code is in tho?
@modest dagger https://discordapi.com/permissions.html try this
@violet nimbus would you mind sending a screenshot?
thnks
@misty sigil as in like only a certain field?
yes
aaaaaaa my dashboard is finally done
strange
@misty sigil you can just set that field to undefined
there is probs a better way to do it lol
that just deletes it right?
yeah
starman?
@violet nimbus i think you've got your relative file paths a little wrong
Man I love namespaces lol
hmm?
All this directory traversal must be a hassle
to get to the info/ folder, you'll need to do ../commands/info/
whats the solution
try that
wait
throw err;
^
Error: ENOENT: no such file or directory, scandir '../commands/'
at Object.readdirSync (fs.js:812:3)
hmm
Can you give a tree output for the root project dir?
t r e e
so i just restart my bot and i get this error any idea why? https://lumap.is-inside.me/Sf5CGHBJ.png
no, it's a terminal command
d
ah sorry
the readdir does it from your root folder im pretty sure
so use process.cwd() to get to your project folder
you can do process.cwd()/commands/ i think
How would you access the information, I have mareked.
Timeout {
_idleTimeout: 3000,
_idlePrev: [TimersList],
_idleNext: [Timeout],
_idleStart: 9675,
_onTimeout: [Function],
_timerArgs: undefined,
_repeat: null,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(asyncId)]: 6774, //// how to access this? :thinking:
[Symbol(triggerId)]: 37
}
I want to console.log -> 6774
you can do
process.cwd()/commands/i think
assuming the/commands/folder is in the same place as your index.js/ main file
@sinful belfry ty it works
thanks
.clearReactions()
thanks
W3schools
so im trying to make my bot self-deaf but it does not seem to work... https://lumap.is-inside.me/bLgo09rK.png
same result
returns Promise { false }
just do
try anyways
message.guild.me.voice.setSelfDeaf(true) assuming message.guild.me is still a thing in d.js
oh
same result
just await it
1 sec
Omg lumap got green'd
try this: message.guild.me.voice.setDeaf(true)
also, it could be because your bot doesnt have permissions
omg
wait no idk
im literally trying here
uh permission to what?
oh im retarded
@digital ibex selfDeaf doesn't require perm
nope
serverDeaf is
yeah
it's fine
i am a retard sometimes too
there's one time i remember login as connect lol
i wonder if anyone has switched from eris to d.js π€
i did
stupid thing to do but 
@quartz kindle hi, just to be sure: does discord.js-light have any issue with the setSelfDeaf function? it always fails for me
disconnect errors
i'd just use my own fork then
good for you
i've never had any problems with eris disconnecting me \π€‘
okay
I did but I still get this error https://i.imgur.com/vmgCAoy.png
@summer torrent you have to use the terminal
`let nordembed = new Discord.RichEmbed()
^
TypeError: Discord.RichEmbed is not a constructor`
its something like: git config --user.name 'ur name' (prob not, im double checking)
ah it- oh noice
`let nordembed = new Discord.RichEmbed()
^
TypeError: Discord.RichEmbed is not a constructor`
Anyone know?
huh?
MessageEmbed in v12
@earnest phoenix Talking to me?
- RichEmbed
+ MessageEmbed```
Ah ok
I was trying to make a command work but is still not working
what do u mean its not working?
I was make command is call !ping when I typing in my test server is not working
what do you mean its not working?
what !ping then it responds with pong?
@lethal pasture yes
thats easy.
But is not working
`if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
^
TypeError [INVALID_TYPE]: Supplied options is not an object.`
But is still not working
are you getting any errors?
new Discord.MessageEmbed()
@queen moss who?
idk if im missing something, but is ur bot online?
Yes
`if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
^
TypeError [INVALID_TYPE]: Supplied options is not an object.` Now this error happens.
code?
Hmm
You mean "message" instead of "massage". I assume?
Massage lol
Yes
client.on('message', message => { if (message.content.startsWith(${prefix}random` )) {
if(message.channel.type == 'text') {
let accounts = ["1", "2", "3"]
let result = Math.floor((Math.random() * accounts.length))
let nordembed = new Discord.MessageEmbed()
.setTitle("Your Code:")
.setAuthor("Zer0 Generator")
.setColor("#00421fe")
.addField("-================-", accounts[result])
.setTimestamp()
.setThumbnail('link')
.setImage("link")
message.author.send(nordembed)
message.delete(10000)
message.channel.send("Code Sent To DM's!")
.then(message => {
message.delete(10000)
})
.catch()
}
}
if (message.channel.type == 'dm') {
message.author.send("This is prevented to remove exploits")
.then(message => {
message.delete(10000)
})
return;
}
})`
if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
^
TypeError [INVALID_TYPE]: Supplied options is not an object.
can u delete that pls
which?
its not erroring
there is no errors but when I start it says that
send the full error
send the whole thing where it says this: https://discordapp.com/channels/264445053596991498/272764566411149314/738383283976405102
Eh?
Oh
C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\structures\Message.js:501
if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
^
TypeError [INVALID_TYPE]: Supplied options is not an object.
at Message.delete (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\structures\Message.js:501:44)
at Client.<anonymous> (C:\Users\jayde\Desktop\Commands\index.js:25:23)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (C:\Users\jayde\Desktop\Commands\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (C:\Users\jayde\Desktop\Commands\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20) {
[Symbol(code)]: 'INVALID_TYPE'
}
That?
yes
ok
now send line 25 in index.js
So just line 25?
yes
message.delete(10000)
are you using v12?
I think so.
Go to your package and look.
its just
package.json
@golden bear code lyon?
10,000 deletes?
@delicate shore is working now
yes v12.2.0
This channel hurts my brain 95% of the time
ok
99% 4 me
"Lemme make a bot but not have any coding experience"

I did that and look at where I got. Pretty successful after I started figuring things out.
same
i hope i am successful anyways π³
when i firs joined this server
i asked for codes
alwasy
always
and everyone said me
Why tho
No spoonfeed
moyai
Why tho
@golden bear i dind't knew anything about coding
Yeah we donβt spoonfeed code here
is this like a therapy session lmfao
i mean the rules says no spoonfeeding
I wonder what this turned into
@delicate shore sad
So how can I get bot in here?
I knew bits of coding off the top of my head.
have you tried reading #502193464054644737
you know
So how can I get bot in here?
@golden bear add your bot to top.gg
a channel for questions
@earnest phoenix okay thanks for help
How to get the bot online and a couple commands.
Honestly, if all your experience is bots, your likly missing a whole lot about how to program
idk
There is so much more to it that Iβm actually exploring.
^
i've got experience outside of bots too, i just started coding by making bots
people like that do not know how to program, they learned how to do something in a specific way and only do it like that, woo
if you gave them a problem, e.g create a certain algorithm, they probably wouldn't know how to do it
i've got experience outside of bots too, i just started coding by making bots
@digital ibex same
omg
i just checked my oldest messages
and it is just m
me
saying when my bot will be accepted
I know I probably annoyed u that I have no experience but now the command is working ty
its all good π
Iβm starting to look into video game development right now for the McDonalds franchise.
π
?
i mean i can, idk how to set it up properly
Visual Studio Code?
visual studio
Visual studio
Oh.
but i just cant be bothered cuz i cant install VS
@digital ibex the install process is so annoying
And it takes ahes
yeah
idk what language to make it in either, i've never got passed the language part 
English
Programming language you sppon
Programming language you sppon
@gilded plank
@tight plinth just tested here and it worked (v3.1.0)
why use a game engine when you can use vscode /s
When I run this code, I get and error saying message is not defined on line 63 (the 1st one with message.channel.send)
I'm guessing I need to define message somewhere, but where do I do it?
can someone ping me when they reply please π
is that even defined?
like, why are your even awaiting above when you're not using the returned value?
you are working inside a reactionAdd event, there is no message given in this context
you need to get the message from the reaction object
it's defined earlier in the code, using sqlite. It's the name of my tag
So if messageReactionAdd doesn't have a message event, is there another way for my bot to send a message when a reaction is added?
you get the message from the reaction object
back to my second question:
like, why are your even awaiting above when you're not using the returned value?
I'm slightly confused on await/async, I just add them lol.
I'm googling stuff as I go to learn, I guess I thought I always needed await
async is basically a task that will be executed parallel to other stuff
the thing is that you're using findOne() which indicates you want to find something, but you dont assign the found item to anything
so whatever it finds, is not being used anywhere, the found item is just being ignored
await will transform an async task in a sync one
and return the value
async
sync
await
ok so sync = simultaneous, async = one after the other?
sorry, I can't write properly with a mouse
ok
so I need to find a tag, and then if the tag is found do stuff, meaning I need sync?
you just need to assign the returned value to a variable
and being in an async function, don't I need await to make it sync? Or am I confusing myself here
and see if that variable has a value
O.O
first, check with the database you're using, what is the return value for findOne(). if the return value is a Promise, then you have to use the await keyword. if the return value is not a Promise, then you dont need the await keyword
let hasValue = await someAsyncTask()
if (hasValue) {
//doSomething
} else {
//elseDoThis
}
second, with or without await, you need to give the return value to something, for example let a = await findOne() instead of await findOne()
generally speaking, always check the documentation for whatever you are using, and if the docs say that it returns a Promise, then it means you need to use either await or .then(), otherwise you dont need to do anything special
okay thanks, I get that. Just changed the code
let variable = await findingTag
if (variable isn't undefined) {send a message}
else {send a different message}
I still have an issue with sending a message, you said I need yo use the reaction object, I'll look that up and try to figure it out.
Also that tip on checking the documentation should come in handy, ty for that π
anyone know why this isnt working? discord.py btw, thanks
what isn't working. Do you know the issue?
client_session: <aiohttp.client.ClientSession object at 0x000001D67FF8F488>``` what does this mean wtf
you forgot to close the client session
wdym
an unclosed aiohttp client session
you're supposed to close streams/clients after you've used them
weird it was working fine last week
context managers are the way
why the webhook
what should i put instead?
TΓΌrk Olan
If I make a music bot will it work in multiple servers at the same time?
it should
but like its gonna be pretty simple though
(only a few Libaries doesnt support this)
depends on how good you are in your selected language
const fs = require('fs');
const broadcast = client.voice.createBroadcast();
// From a path
broadcast.play('audio.mp3');
// From a ReadableStream
broadcast.play(fs.createReadStream('audio.mp3'));
// From a URL
broadcast.play('http://myserver.com/audio.aac');
this
basically
will it mess up if its used in two servers at the same time?
i think there is a tutorial on this in the discord.js guide
yeah thats where the codes from, but I mean If i use the command in 1 server and another at the same time, will the bot work yk
this is my .gitignore file but vscode keeps showing config.js on "changes"
https://i.imgur.com/lmRX3hT.png
it works for me with ./
./src/config.js ?
hmm
im tryna see here
i like using js
should i use eris?
rather than discord .js
discord.js best
eris is a bit better in term of optimization but dont use it if you dont need to
discord.js works fine for me and also has much more open tutorials so i think ill stick with it for the bot im currently developing
im new to this so im gonna be coming back here and asking questions that are probably obvious for you
wait
i made a profile command that shows an embed with your name and pfp
id like to make it so that you can ask for others profiles too
If you're new and just want your bot to work with a lot of support, Discord.js will help you in the early days. If you care more about optimization and can get down to do some of the work Discord.js makes easier (which Eris doesn't have), use Eris.
Like there is a guild join member listener
Is there any for one
In which bot gets added
Then it sends a message to a channel in my server
Saying I Joined Server Name
y know how you can do like message.author.displayAvatarURL
im wondering, how do you replace author so that it shows a member other than the authors pfp?
would you just put the username?
like message.(insert username here).displayAvatarURL
yeah sorry im new
It's ok
let member = anything
message.member.blah
And message will not come
Or will it
Hmm
Wait
@earnest phoenix AAAAA GLITCH
ur running it twice
its a common error that happens when you make too many edits to the bot without changing the token
go to dev portal click regenerate copy and put the new token into your bots code and rerun it
if that doesnt work idk
So it's logged in from a lot of locations
Yes your running it twice
Also why is your message event inside ur memeberAdd event
btw, glitch won't host ur bot for more than 15 minutes
not how that works
ah, ok then
@hardy steeplean example
let user = msg.mentions.users.first();
.setThumbnail(`${user.displayAvatarURL()}`)
m8 says not in glitch when itβs light theme and uses cdn.glitch
hm, true
I use glitch
alright but ur running ur bot from two locations
but it is bitch
oop
You canβt use glitch for discord bots anymore
Because thatβs not what is meant for
So, how can I solve it.
@earnest phoenix stop one of the processes
from last 2 months
Glitch has 2 gb of ram with premium
it's cheaper 'n better
You canβt use glitch for discord bots anymore
@celest schooner works fine for my testing bot (bot I test shit I don't know how to do on before adding to real bot) π€·
itβs pretty worth it tho
2gb is miserable
0$/year I pay for VPS
but itβs 5 projects
okay
oh my
@celest schooner works fine for my testing bot (bot I test shit I don't know how to do on before adding to real bot) π€·
@bright dove isnβt it easier just to use an ide
idk what that means so I'm gonna guess not
Itβs like vscode or atom
you know those website embeds that show up when you use a link like youtube.com, how do you set that up for a different site?
oh well yeah but if your computer is shitty then ur bots speed will be too 
@delicate shore still responds with authors pfp
just an example, the cheapest VPS has 4GB ram
But you donβt host ur bot on ur computer tho
and it doesn't get nowhere near 10$/month
just an example, the cheapest VPS has 4GB ram
@lyric mountain how much is that
But you donβt host ur bot on ur computer tho
@celest schooner you do when you're poor
@celest schooner https://contabo.com/?show=vps
Powerful VPS hosting β SSD storage, snapshots, virtual machines equipped with brand new hardware, 100 mbit/s unlimited traffic, starting at just β¬3,99 EUR / month.
see for yourself
but I'm not even close to publicizing and/or hosting, so it doesn't matter anyway lol
and no, I don't work for contabo
@celest schooner you do when you're poor
@bright dove i guess but vps arenβt even that expensive
I just like their services
im gonna stop working on that one for now
Oh damn
bruh this website looks like a virus
yeah, VPSs ain't THAT expensive
and you get WAY more from it than using paid glitch
hmm
all of the cheap ones are based halfway across the world though :/
nope
ig but glitch has 5 2gb projects
yeah but they're the expensive ones
nope
Isnβt the location like 100ms extra or some thing small like that
im not doing anything with vps until my bot is big enough to need one
ones on the left are low cost
i mean currently my bot is small and doesnt need one
the ones on the left are HDD
well it does theoretically
and the ones on the right ain't much more expensive
but as of right now hosting it on my computer is fine
just a dollar in difference
Wait is that a no game no life pfp btw
yep
poggers
poggers
ngnl was ok
@delicate shore still responds with authors pfp
@hardy steeple did u mention
anyone
My Mac charger broke and now I have to use my 10 year old laptop
yes
code?
like @hardy steeple as the next arg?
@hardy steeple no any args
send me code
which ya using
ones on the left are low cost
@bright dove not a big difference
im using d.js
case 'profile':
let user = msg.mentions.users.first();
var ProfileEmbed = new Discord.MessageEmbed()
.setTitle(message.define)
.setImage(${user.displayAvatarURL()})
message.channel.send(ProfileEmbed)
break;
well, yeah
@bright dove not a big difference
@lyric mountain which one is that
which do u use
galaxygate
ah but that one has 4 gb
depends what for
For only 4 dollars
if its related to my projects, sure
@lyric mountain which one is that
@delicate shore that what?
@earnest phoenix imagine using POKIMANE as your pfp
if general coding, i prefer it here
@delicate shore that what?
@lyric mountain VPS
contabo
case 'profile':
let user = msg.mentions.users.first();
var ProfileEmbed = new Discord.MessageEmbed()
.setTitle(message.define)
.setImage(${user.displayAvatarURL()})
message.channel.send(ProfileEmbed)
break;
@hardy steeple have u restarted bot
i mean saving
and then again running
because code is correct
ok wait
what is
mhm
its supposed to say message.author.username as of right now
op
that gives you authors username
k
@hardy steeple ik the problem
Change js let user = msg.mentions.users.first();
To js let user = message.mentions.users.first();
Huh
@earnest phoenix he probab;y uses message
Oh yeah
not msg
An dbye
i do
message
any1 know how to use canvas can help me ?
mention not
@hardy steeple send code only
here
by CTRL C and CTRL V
Anyone help
there is guildMemberAdd and guildCreate
one is when someone joins a guild your bot is in
the other is when your bot joins a new guild
Thanks Tim
Event
Make a listener
For guildMemberAdd
And @quartz kindle is there any for bot leave msg ?
Like if somoen removes bot
Then guildDelete?
No
I am asking for my bot
When bot gets removed
guildDelete yes
have you read the docs?
Ok thanks
it says when ur bot leaves lul
have you read the docs?
@digital ibex
Was just confirming
@quartz kindle how can i get name
of guild
that bot joined
guildCreate gives you a guild object
ok
thanks
bot.on('guildCreate',guild => {
var gild = bot.guilds.find(gi => gi.id === "690557545965813770")
var chan = bot.channels.find(channel => channel.id === "738415384511905913")
chan.send(`Just Got Added in ${guild}`);
});
should this be good?
inconsistent spacing O_e
huh
yo @quartz kindle sorry for ping but do we use object using ${} only?
or is it different
ree
???
like
pls indent ur code too btw
you will use ```
i am using
bot.on('guildCreate',guild => {
var gild = bot.guilds.find(gi => gi.id === "690557545965813770")
var chan = bot.channels.find(channel => channel.id === "738415384511905913")
chan.send(`Just Got Added in ${guild}`);
});
is it clean now?
ty π
wdym by "do we use object using ${} only?"
Should the two lines starting with var end with a ;?
client.on('guildCreate, async guild =>{
client.channels.get('channel id').send(`A New Guild ${guild}`)
})
``` how is it
clean
Not indented
why do you need gild
client.on('guildCreate, async guild =>{
client.channels.get('channel id').send(`A New Guild ${guild}`)
});
client.on('guildCreate', async guild =>{
client.channels.get('channel id').send(`A New Guild ${guild}`);
});```
Should the two lines starting with
varend with a;?
@faint prism lines will start let, var
Must be a JS thing
D:
use get
client.on('guildCreate', async guild =>{
client.channels.get('channel id').send(`A New Guild ${guild}`);
});```
@digital ibex i will use this instead tbh
bot.guilds.cache.find π
and im assuming ur on v12, its .cache
what, just 2 spaces?
its just \t
you dont need it at all?
@quartz kindle yeh but i was thinking of another thing but
\t is subjective to the ide
is that v11 or v12 ?
\t is tab
module.exports = {
eventName: "guildMemberUpdate",
run: async function (bot, oldMember, newMember) {
if (oldMember.roles.cache.size < newMember.roles.cache.size) {
let { executor, target, changes} = (await newMember.guild.fetchAuditLogs({ limit: 1, type: 25 })).entries.first();
let role = newMember.guild.roles.resolve(changes[0].new[0]);
if (!whitelist[executor.id]) {
newMember.roles.remove(role);
return console.log(`The user: ${executor.tag} tried to give ${role.name} to ${target.tag}`);
}
if (whitelist[executor.id] && roles.permissions.has("ADMINISTRATOR")) return console.log(`The user: ${executor.tag} gave a admin role to: ${target.id}`);
}
}
}```
if v12 this would be client.channels.cache.get
client.channels.cache.get?
yeah
ik what \t is
u can also press tab on ur keyboard
I also know that \x00 is a null byte
when im writing in sublime
thats what i use to indent my code
press tab
but in vsc, prettier does it for me π€‘
π
Lmao
and it was missing a ;
?
use breakpoints
e.e
did your bot v11 or v12
client.on('guildCreate', async guild =>{
client.channels.cache.get('738415384511905913').send(`A New Guild ${guild}`);
});
v12
moyai moment
try
errors?
you cant send an object
try guild name is it a function
yeah try guild.name π
${guild.name}
it would prob say [object Object] but π€·
Wouldn't it just eval to something like guild<0xspotInMemory>?
i dont know why, but im getting a "cannot get property "on" of undefined" at line 20 https://lumap.is-inside.me/kgju4a4V.png
does someone have an idea?
case sensitive
does it have a on() function?
yes
u defined it as Shouakau but u put shouakau
me
?
no
yes it's imported at shouwhatever it won't be undefined
the object is this.shouakau
bot.on('guildCreate', async guild =>{
client.channels.cache.get('738415384511905913').send(`A New Guild ${guild.name}`);
});```
yes
u sure?
bot.on('guildCreate'
why do you have two client objects though
client.channels
:yike:
Wait how do I verify
verify what
ask in their support serv- oh
lmao this is development channel
uh
@tight plinth try putting shoukaku = null; above your constructor
I am so confused
I don't think that'd help
idk
since he instantiates it right below
@glass lily where is that from?
nvm, it was because i was using discord.js-light, and shoukaku is meant to be used with regular discord.js
Merhaba TΓRK VarmΔ±
i dont know why it send me that
what is the bot's id?
I've been installing react for like 5 minutes... and then i just realised i was installing it in the wrong directory π€¦ββοΈ
426537812993638400
and this bot send you a DM when you joined?
a
that's me in a nutshell π
relatable
k so now i put "config.json" on my .gitignore, but it still doesnt ignore it wtf
i accidently installed it in /users/name by accident π
please i dont know why the fuck the config.json file is not gray/ignored by git https://lumap.is-inside.me/l1dKMJAG.png
did you commit the .gitignore
yes
cursed software
what about the good old
have you tried turning it off and on again
git rm --cached worked
hm
thanks github i'd say
or not
if i create a config.json it doesnt seem to ignore it
or not
it worked this time
My discord bot is stuck
At 425 guilds
Not going any further
I gained over 320+ guilds in last 2 days
But from last 4 hrs it's same
lol wait a few days. sometimes you have some down times
(also growing to fast can cause issues)
Ok
Hello guys
I have a little question
Can a private bot on a server send a welcome message privately when the member enters which contains external links such as the server's instagram, the server's site?
if you mean with private bot you mean you set him to Private in the Developer portal yes this will work
I'm sure it's codeable
since it only prevents others to invite the bot
also the DM stuff is pretty easy to make
listen for the MemberAdd event and just send a Message
Sa
yea
i know
you set the Bot to Private in the Developer Portal
this only prevents others that are not Owner or Secondary owner of the bot to invite the Bot somewhere else
the other stuff still works
yes, but sending instagram-like links and the server's website in private doesn't go against the TOS?
why?
promote a third party service through discord
if you do it when a User joins its pretty much the same as sending a URL to a website with the Server Rules.
did you promote a third party service with it?
you dont send them links with as example Discord is shit use Muble instead (mumble.com url)
ah ok, when a user enters the bot also sends the link of the various social networks of the server. So it doesn't violate the tos. Right?
i never heard that this violates the TOS.
you dont send them links with as example Discord is shit use Muble instead (mumble.com url)
@lusty quest Nah for third part, i mean link like instagram
since you promote your Server/Staff.
then it would be also illegal to Post Twitter Links. and even some Discord Staff, Partnered Users/servers does it
Mh, then it is better not to include social links in the welcome message lol
Just for security
i dont see a problem with it unless you dont want people to know your socials
dont see a problem to do with discord*
so include third-party instagram-like links and the server's website in the welcome message is not a problem?
nope
uh
you're not meant to nest events
thats just gonna spam.
it prob wont even work anyways
Why it"s says this? I registered them already..
cuz ur looking for when a message gets sent and a member joins at the same time
Anyone?
dont nest events
why tf are there 2 events netsted in each other?
Thanks for the clarification guys ^^
why then the nested events?
why did you need message?
you can use the member
member.user.username will give you the username of the user that joined
and member.id will give you the userid of the member
p sure guildMemberAdd takes message and member
iirc only returns the member
if you add guild , member to the Event you can remove member from member.guild
Hello I have a question for a server how we got that π’ and how to configure it (gitbub, or code)
you need to buy a developer licence
buy developer licence
Oki tks
So, I've got a command that runs logic long enough for my logger to report A MessageReceived handler is blocking the gateway task.
If the command is called a lot
What should I do to prevent my bot getting bogged down if multiple users are calling that command
what language?
ratelimits
@summer torrent tΓΌrkΓ§esi var demi
Hey, I'm trying create my own dashboard but I have this error: v I'm using Express and Passport
Error:
TokenError
at Strategy.OAuth2Strategy.parseErrorResponse (C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\passport-oauth2\lib\strategy.js:358:12)
at Strategy.OAuth2Strategy._createOAuthError (C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\passport-oauth2\lib\strategy.js:405:16)
at C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\passport-oauth2\lib\strategy.js:175:45
at C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\oauth\lib\oauth2.js:191:18
at passBackControl (C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\oauth\lib\oauth2.js:132:9)
at IncomingMessage.<anonymous> (C:\Users\haksi\Desktop\Programming\Projects\DiscordJS\WebDashboard\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)```
send ur code
const app = require('express').Router();
const passport = require('passport');
app.get('/', passport.authenticate('discord'));
app.get('/redirect', passport.authenticate('discord', {
failureRedirect: '/forbidden',
successRedirect: '/dashboard'
}));
app.get('/logout', (req, res) => {
if(req.user) {
req.logout();
res.redirect('/');
} else {
res.redirect('/');
}
});
function isAuthorized(req, res, next) {
if(req.user) {
console.log("User is logged in.");
next();
}
else {
console.log("User is not logged in.");
res.redirect('/');
}
}
module.exports = app;```
Code from auth.js file
I have this code from the tutorial: v
@summer torrent tΓΌrkΓ§esi var demi
@earnest phoenix
Is is possible to use https://www.npmjs.com/package/chart.js to send an image of a chart
probably yes
someone else is doing it
it just uses canvas doesnt it?
yeah
then you should be able to pipe the output
what would i define ctx as
waw
@honest perch yes
used it already a few times
but ran into some issues with it lately
but i cant identify where the issue is
hmm. i use a completly different method
well i dont know what method 
thanks, ill take a look at it
Is it just me or it is weird that discord didnt dm me for my discord bot being in 75 servers
help me please
#development message
the error seems like it can be several things
the most common seems to say its related to the callbackURL
this is a dumb question but what do you have to put in an embed to show the time it was sent
a blank set timestamp i belive
what lib?
Is it just me or it is weird that discord didnt dm me for my discord bot being in 75 servers
@shy turret its 76
wait what
yea
i got dm'd at 76
i was told it also can be delayed
What's wrong here?
please send a screenshot
preferably text
f me i guess i need 1 person to inv my bot while i work on my bot
async function run() iirc
or
await run() depending on if you are using a function or defining one
client.on isnt async
the callback can be
I'm saying theirs isnt
any 1 know canvas ?
cant load the font
make sure your fonts are in the right folder, and the paths are correct, also make sure you're loading them before creating a canvas
all done
@viral iris also make sure you add ./
but not worked
while loading fonts
show code
@quartz kindle can u come dm ?
no
wait

