#development
1 messages ยท Page 1321 of 1
no
i guess this is wrong
that's not the problem
././commands doesnโt look right unless i donโt know something
Try reading from __dirname + โ/commands
Bruh.
yo.. i got problem again XD
the Terminal isnt responding
i need to run the command code
but i cant type in the terminal...
oh... nevermid
@real sierra i guess u have a low end pc
If you have a program hanging or something in the terminal you can press CTRL + C to end it
Yeah
lmao XD
whats this
.setColor("#FF0000")
.setAuthor(`${message.guild.me.displayName} Help`, message.guild.iconURL())
.setThumbnail(client.user.displayAvatarURL())
const categories = readdirSync("./commands/")
embed.setFooter(`${message.guild.me.displayName} | Total Commands - ${client.commands.size - 1}`, client.user.displayAvatarURL());
categories.forEach(category => {
client.commands = new discord.Collection()
const dir = client.commands.filter(c => c.config.category === category)
const capitalise = category.slice(0, 1).toUpperCase() + category.slice(1)
try {
embed.addField(` ${capitalise} [${dir.size}] - `, dir.map(c => `\`${c.config.name}\``).join(" "))
} catch (e) {
console.log(e)
}
})
return message.channel.send(embed)
let command = client.commands.get(client.aliases.get(args[0].toLowerCase()) || args[0].toLowerCase())
if (!command) return message.channel.send(embed.setTitle("**Invalid Command!**").setDescription(`**Do \`tr!help\` For the List Of the Commands!**`))
command = command.config
embed.setDescription(stripIndents`**The Bot's Global Prefix Is \`tr!\`**\n
**Server Prefix Is \`${prefix}\`**\n
** Command -** ${command.name.slice(0, 1).toUpperCase() + command.name.slice(1)}\n
** Description -** ${command.description || "No Description provided."}\n
**Category -** ${command.category}\n
`)
embed.setFooter(message.guild.name, message.guild.iconURL())
return message.channel.send(embed)
}
};```
You have an emty field in your embed
@next flax one of your embed fields are empty
Hey together. Right now I am building a "hug" command. I am requesting the pictures from different websites. However they mostly do not load after executing the command. Is there a way to let the bot pick the pictures randomly from my PC? I have not found out a way to build this in.
I know how to let the bot randomly choose pictures:
num = randint(1, 52)
try:
await ctx.send(file=discord.File("C:/Users/Dominik/Pictures/MEMEs/{}.jpg".format(num)))
and I also would like to have this wit the GIFs for the command above
k
at /home/runner/Thunder/commands/special/thelp.js:28:66
at Map.filter (/home/runner/Thunder/node_modules/@discordjs/collection/dist/index.js:190:17)
at /home/runner/Thunder/commands/special/thelp.js:28:45
at Array.forEach (<anonymous>)
at Object.run (/home/runner/Thunder/commands/special/thelp.js:27:24)
at Client.<anonymous> (/home/runner/Thunder/server.js:101:17)```
categories.forEach(category => {
const dir = client.commands.filter(c => c.config.category === category)
const capitalise = category.slice(0, 1).toUpperCase() + category.slice(1)
try {
embed.addField(` ${capitalise} [${dir.size}] - `, dir.map(c => `\`${c.config.name}\``).join(" "))
} catch (e) {
console.log(e)
}
})
return message.channel.send(embed)
}
};```
@cinder sandal u know?
@fickle sapphire or u
so what should i do
is category defined
so what should i do Erwin
i m broke
then unbreak it
when something doesnt exist in js you have to options
make it exist
or check if it exists
are you sure .config exists?
cuz it says it doesnt
it'll either be one that doesnt have it thats error'ing your code, which would likely mean you need to standartize your command format
OR config doesnt exist in ANY commands
ye it doesnt
@next flax in the guide they provide a dynamic help command example
lemme fetch it rq
@crude merlin html
ok
Yeeeaaaa, i tried css and i dont get how to fetch the logo
Yeah after
is someone know how to add to status in how many bot are on servers?
so what function to make it fload
ctrl + shift + c and click the logo, easier 
no wait what @pale vessel
you still need to use the html <style> tag and css to style the logo
is someone know how to add to status in how many bot are on servers?
ok
@earnest phoenix client.guilds.cache.size
${client.users.cache.size} Members @earnest phoenix
no
add this to status message
this doesnt work
it should
use backticks
its still 0
Yeah
its dont change
is it in any servers?
@opal plank i dont want dynamic help
pong
i just want help cmd of that type
map out the categories, then push an array on it
thats how i would do it at least, which is really not very performant
but it would work, just cuz i like complicated code
Map()
do u have a example code of help cmd like this?
for category of categories set(category, {entries:[]})
then just spread it
and loop again
cuz fuck sanity
probably best to use string conotation tbh
let string = '';
for(category of categories) {
string += command + ':\n';
for(c of category(command)) {string += command}
}```
something like that should do the trick
okay
Have you put it inside a message event handler?
is the msg.edit action rate limit high?
no, as long as you don't put it in a loop
is there something like process.restart() ???
no, you need a process manager like pm2 and use process.exit(). it'll restart the process for you
o
array[Math.floor(Math.random() * array.length)]
ye
my brain gonna explode
How to edit a channel's topic in d.js?
my Bot doesnt respond to my command
@real sierra we'd be helpful for you if you provide some more information
What do i do now ;-;?
@urban holly there are guides yk
Oh well that proves my dumbness
Discord.js?
I actually have no idea what im doing ๐๐
Oop-
lol i didn't even realize
I actually have no idea what im doing ๐๐
@urban holly well you should probably know what you are doing before creating a bot
dw you have you start somewhere
creating a decent bot requires knowledge of programming and coding, so i'd suggest you start by learning how to code
Welp-
Heres a good guide for discord.js if you are starting https://discordjs.guide/
I don't have school today so im gonna learn
You cant learn it in a day
if you dont want to, there are some tools that can do some stuff for you, like discord bot maker, botghost and bot designer, however these tools are much more limited than coding it yourself
^
hi
how can I round any number to its next number? like for example, even if it is 2.25, it will be 3.
2.10 => 3
2.80 => 3
8.7 => 9
8.10 = 9
80.4 => 81
thanks!
No problem! ๐
how can I make a loop that loops tries times?
for(let i = 0, i < tries, i++) {}
for(let i = 0; i < tries; i++) {}

:NM_Kiss:
@gentle lynx eww what the fuck
What is the owo's remittance order
@earnest phoenix 
case 'members':
const countmem = new Discord.MessageEmbed()
.addField(`${what do i type here?} members.`)
.setColor("RANDOM")
message.channel.send(countmem)
break;
what do i type in the ${}?
What is the owo's remittance order
@gentle lynx any variable with the string or number or boolean data type
client.members.cache.size
not working ^
@tardy hornet what is not working?
found what i needed to do
nvm
i worked it out
ty anyways
client.members.cache.size
@gentle lynx
message.guild.memberCount
its working

@tardy hornet that's completely wrong
@earnest phoenix its working
smh
@tardy hornet I thought you were talking about the members of the bot
not in the server
Hello everyone, wanted to ask, has anyone worked with LavaLink? It's just that I'm completely rewriting the music now and I have such a problem ... If you restart the bot, or register the disconnect command and re-register play, the song will not play ... At least until the time that the previous song lasts , will not work
the bot leaves the voice channel with the dis command, using manager.leave(guild.id)
@real otter i don't know much, but are you destroying the player?
@misty sigil Ok(
to install moment its:
npm i moment
@tardy hornetbruh moment
you
What is the run command for globally installed npm packages on linux? <package name> does not work.
So I could need a little help. I want to display the duration of a YouTube video but do not really know how to define it. I already got some things but I am stuck at the duration. Does someone know how to define it?
npm install <package name>
no, no
@surreal sage
What
whenever i run a msg.channel.send function with a eval commabdn, i get this error, anybody knows why? It doesnt break my bot as the message is sent, but its kinda annoying
@tight plinth It says the problem 
I don't know anything about pm2 sorry d:
@earnest phoenix it isnt anything about pm2
How do i just run a global installed package
come in a vc if you want
testing #1
How do i run a npm globally installed package? on linux
Hi
case 'members': const countmem = new Discord.MessageEmbed() .addField(`${what do i type here?} members.`) .setColor("RANDOM") message.channel.send(countmem) break;what do i type in the ${}?
@tardy hornet client.users.cache.size
@surreal sage did you change node version after installing it?
@surreal sage its ok it was like 30m ago
If you change or update node.js version, you need to reinstall global packages
Then try closing and reopening terminal
How do I change the file size limit for a pterodactyl panel
You just need to reopen the ssh connection
No need to restart the machine
Use http instead of https
liam, quick question: what do you use to create a webhook?
Are you using a dbl library or a plain webserver?
ok thx
hey all
No free VPS, pixel
damn
lOL
hmm
Already knew the question
yeah
there might be some free vps but they are either scams or shit
like hardcore shit
thing is, i'm a child
Still didnt work with plain http?
At least he's honest
i dont have money everywhere that im allowed to spend
I got vps when I was 11
Leave your PC on 24/7

nice
Or do you have an spare Android phone by chance?
i guess that would be the only plausible solution
Or do you have an old Android phone by chance?
@faint prism i might, why?
You can host from that
Pixel you are over the age of 13, right?
13 โฅ
So 13
maybe, maybe not cannot share
Spooky. You don't own these vps 99.9%
lmao lol

Yes and no
My vps is on that rack
But not my datacenter
Itโs galaxy gates lol
Mine is probaby there too i guess
how would i go about that
@loud geyser https://github.com/DoorThief/termux-discordbot-setup
It's just a bash setup script. It will deploy a NodeJS template bot in Termux
k thanks mate
Cheers
@quartz kindle I restarted my vps. Still doesn't give a valid reply. Only a error that the command doesn't exist
Do i have to run it with a prefix?
Like npm or node
npm = node package manager
ik
So, you don't run anything with that
I'm trying to run pm2 on my linux vps
it just gets other libs
But it just doesnt reply
pm2 start index.js --watch
pm2 start <file name>.extension
that aint the prob
Is what I do
i know how it works
Oh
oh right pm2 can do it by itself
Whatโs the problem
come to testing #1
Kk
vc
oh backwards whoops
doesnt work?
Did you see the part called "install"
wut
npm i pm2 -g
he did do that?
the -g should make it globally accessable
does it not work now?
try npx pm2 start file.js
npx is not npm
IT JUST INSTALLS
no
wait
why does it have to 'install' ever time?
so npx pm2 start would be equivalent to pm2 start
ik
not sure
why didn't it work without npx anyway, you already used -g
idk man
but using npx seems to be working
Npx technically caches. It's how it uses the packages, it makes a mini version of it, then runs it. Pm2 should be something you don't need npx to execute. If you make it global you should be able to access it. You might just have to save it in the directory.
J's pm is just wack tbh
It's good, but can't exactly say it is amazing. There are some limitations to repl.it
Whaere list of bots
On the website
You broke it.
do you have game servers running on it as well?
no,,
You shouldn't pout your entire porn collection in memory, btw ๐
lmao
How to get cpu usage @pearl trail?
@tired panther i'd use the package 'os' for nodejs
is it running linux?
How do I check if a specific user that I set is being pinged? using discord.js
@abstract coyote check message.mentions
@real otter i don't know much, but are you destroying the player?
@misty sigil How?
<player>.destroy()
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=mentions see this @abstract coyote
@tired panther i'd use the package 'os' for nodejs
@misty sigil i know that, but I want my owns xD
heh
yeah something like
if(message.mentions.users.first() === 'user id') {
code here?
}
``` like that?
@misty sigil Hmmm, thx, i will try
@abstract coyote it returns a user object so it'd be .first().id
np!
you need os module, then
const core = os.cpus()[0];
and to get your cpu usage, use
core.speed
How would I add sound effects to lavalink?
@tired panther you want cpu usage or cpu speed?
@quartz kindle cpu usage without any node module
of the entire machine or the current process only?
@misty sigil
No, it didn't help (
of the entire machine or the current process only?
@quartz kindle of the node file running , mean my bot
no idea then

cute small server @mattthew#0001
heroku nice #development message
@pearl trail how many guilds does ur bot serve?
Hey i had created music bot i want to do if someone use join command bot stay in that vc 24/7
how do u mean?
how to stop all cmd from dm by discord guild
blocking all DM msgs?
return the code if the channel is a dm/the message does not belong to a guild
yeah you can do it in JS
if (condition) return; 
don't tell me you copy pasted that
don't tell me you copy pasted that
@pale vessel no
then show code
xD
const client = new Discord.Client();
var x;client.on('ready', () => {
console.log(`Started bot ${client.user.tag}!`);
});
client.login("token remove lol")
client.on('message', message => {
if (message.content === 'hstart') {
message.reply('monitoring op');
setInterval(function() {
var links = [];
for (x = 0; x < 1; x++) {
var used = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var link = "happy.com/";
for (var y = 0; y < 4; y++) {
link += used.charAt(Math.floor(Math.random() * used.length));
}
links.push(link);
}
message.channel.send(links.join(" "));
}, 5000);
}
});```
use command handler xD
@faint prism
@earnest phoenix whats here the problem?
where did you put the check?
@earnest phoenix whats here the problem?
@tired panther problem is this bot working on dm+channel i stop from dm

i do?
where did you put the check?
@pale vessel i put but not w0rk
How i can create channel
it's either an object or null
you mean discord verification?
how i can create a channel ?
@earnest phoenix on discord over 75 guilds
you mean discord verification?
@pale vessel yes
check your library's documentation
If(message.guild === true) return;
@tired panther put on script lol
what's your library?

u can apply
where
i think node js is her /.him
@willow mirage

How i can set channel's perms to private
am i a bother to you
no u are my docs
He got you there
i need help with commands
go on...
@tired panther what i do
ur bot is in 75 server, when yes then i will tell
op man
HOw i can get a random's id ?
Just updated my older bot from v11 to v12 finally, and now I can't seem to find out why this is happening:
Error with DBL: Error: 400 Bad Request
kinda confused cuz it doesnt seem to affect anything
please don't do object === boolean, this will always return false.
HOw i can get a random's id ?
@willow mirage Simply: Generate a random number with remainder of your bot's cached users count -> Get user from your bot's cache with index of the random number.
Just updated my older bot from v11 to v12 finally, and now I can't seem to find out why this is happening:
Error with DBL: Error: 400 Bad Request
@vague heart Show your DBL post code with token removed.
from google.com :))
Well go for that - if it really exists
const DBL = require("dblapi.js");
const dbl = new DBL("token", client);
dbl.on('posted', () => {
console.log(`Server Count Posted | ${client.guilds.size} Guilds`);
});
( @restive furnace ) ^
can someone tell me how can we restrict bot not to leave vc
@vague heart did you update dblapi too?
if still same, ill just post you snippet from #312614469819826177 with some fixes
// client is your Discord client.
const fetch = require('node-fetch');
const key = 'YOUR DBL KEY';
fetch(`https://top.gg/api/bots/${bot.user.id}/stats`, { method: 'POST', headers: { 'Authorization': key }, body: { server_count: client.guilds.cache.size }})
.then(() => console.log(`Posted to dbl.`))
.catch((e) => console.error(e));```
@loud geyser just use repl.it i was in the same situation as you
@spiral crag i love repl it
cant figure out how to host there though @spiral crag
@green kestrel i might host on repl it since i have experience with it, how would i go about hosting there
its client.guilds.cache.size
Does someone has a bot check permisson code?
Bot check permission?
yes @solemn latch
I dont understand, checking who's permission? The bots? The users? The file access?
What lib?
discord,js
ik how to do that
how can i host a discord py bot on repl it
I was to lazy to code xD
We don't spoonfeed
yes, Ik
You just create a repl that uses python @loud geyser
And then install the package for discord py
kk
Something went wrong... TypeError [INVALID_TYPE]: Supplied options is not an object.```
```js
else if (command === 'purge') {
if(!message.member.hasPermission("MANAGE_CHANNELS")) {
return message.reply("You cant delete messages.....").then(m => m.delete(5000));
}
if (isNaN(args[0]) || parseInt(args[0]) <= 0) {
return message.reply("Thats not a number you thick shit").then(m => m.delete(5000));
}
if (!message.guild.me.hasPermission("MANAGE_CHANNESL")){
return message.reply("sorry i cant delete messages i need manage channesl perms").then(m => m.delete(5000));
}
let deleteAmount;
if(parseInt(args[0]) > 100) {
deleteAmount = 100;
} else{
deleteAmount = parseInt(args[0]);
}
message.channel.bulkDelete(deleteAmount, true)
.then(deleted => message.channel.send(`i deleted \`${deleted.size}\` messages.`))
.then(m => m.delete(5000))
.catch(err => message.reply(`Something went wrong... ${err}`))
}```
@solemn latch is that all, will it just keep running once i run it once?
@peak osprey im p sure its <message>.delete({ timeout: 5000 })
๐คทโโ๏ธ never used replit
ok
thanks
Debugger attached.
Process exited with code 1
C:\Program Files\nodejs\node.exe .\Index.js
LightBot Is Online!
Index.js
Cmds are now working
Index.js
Activity set to lb!help | 69 servers!
Index.js
(node:24144) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message
at RequestHandler.execute (c:\Users\linds\Bot\Bump\giveaway-golang-bot-master\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ... to show where the warning was created)
<node_internals>/internal/process/warning.js
(node:24144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
<node_internals>/internal/process/warning.js
(node:24144) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
<node_internals>/internal/process/warning.js
๐คทโโ๏ธ never used replit
@solemn latch works man, thanks!
unknown message
else if (command === 'purge') {
if(!message.member.hasPermission("MANAGE_CHANNELS")) {
return message.reply("You cant delete messages.....").then(message.delete({ timeout: 5000 }))
}
if (isNaN(args[0]) || parseInt(args[0]) <= 0) {
return message.reply("Thats not a number you thick shit").then(message.delete({ timeout: 5000 }))
}
if (!message.guild.me.hasPermission("MANAGE_CHANNESL")){
return message.reply("sorry i cant delete messages i need manage channesl perms").then(message.delete({ timeout: 5000 }))
}
let deleteAmount;
if(parseInt(args[0]) > 100) {
deleteAmount = 100;
} else{
deleteAmount = parseInt(args[0]);
}
message.channel.bulkDelete(deleteAmount, true)
.then(deleted => message.channel.send(`i deleted \`${deleted.size}\` messages.`))
.then(message.delete({ timeout: 5000 }))
.catch(err => message.reply(`Something went wrong... ${err}`))
}```
handle it
ok
YOUTUBE_API_KEY want to.
@misty sigil Ok, i have this problem https://cdn.discordapp.com/attachments/725220842643914753/765961412140204092/image0.png
idk
Kk
How to delete a guild which the bot created?ping me
Docs
guild.delete()? lol
Why does it not work
well what is the error?
reference errors are primitve: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_defined
And how many guilds can u create with the bot? are not there any limits?
You can only create guilds until 10 or something as a bot iirc
the error is that guild is not defined lmao
well of course, you need to specify which guild
message?
you use guild.delete() after you already got the correct guild
yes iK
Yeah, you can only create guilds if you bot is in less than 10
ah intereseting, why is there the guild create function?
Presumably for bots that need guilds for something, logging or something
no
on replit may be
but your discord bot will not take the idle status, when u do not exectuted it @loud geyser
repl is online ide
Repl, just like glitch and heroku are non standard platforms for hosting.
Much less people will know a lot about them
true
ive been using it for quite a while and it seems popular though
mainly using because it is free
but, do you think it will continue to stay online after i close it?
the tab
๐คทโโ๏ธ I say get a basic bot together and try it
k thanks
@loud geyser use heroku
Heroku is now a paid platform isnt it?
@solemn latch no
24 days free per month tho
Yeah iirc
So for a decent bot its practically paid now
yeah I guess
Repl will go the same direction imo
I said heroku would do something after glitch banned uptime robot and changed TOS
Now everyone will move to repl and repl will be forced to change
People hosting bots don't realize they are killing platforms practically
People hosting bots don't realize they are killing platforms practically
With their unoptimized code, yeah
Hello. https://ask2ask.com
it'd be https://nohello.com/ in this case, free.
Don't Just Say "Hello" in Chat.
check if the thing exists before using .id
the error suggests otherwise
that error definitely suggests otherwise
you're trying to use .id of something that doesnt exist
you need to figure out what is it thats missing
Look at <whatever>.id
Make sure <whatever> is not null and has an .id property
try it
damn it i need somewhere to host for free
port forward it
@loud geyser you won't find anywhere
it fully depends on what router you have
f
i can't provide help
damn mate i need hosting
thats a network ip, yes.
Yae gente
I don't really recommend port forwarding unless you're serving a public service seperate from your home network
^^
A safer alternative is hosting a vpn server and setting up firewall rules.
Another alternative is Ngrok
wtf is ngrok
ngrok secure introspectable tunnels to localhost webhook development tool and debugging tool
i got that by googling
ye it seems pog ngl
I've used it for temporary websites and it's dope. It's paid plan is also really cheap is you want more than it's free
PINS

Oh shit they added oauth
Yeah, and pm2 isn't native
Go use docker or systemctl or screen or any native program instead
Yeah?
dimden.dev
how do i code my bot
In notepad
You actually don't even need process manager if your code isn't erroring and exiting all the time
how do i code my bot
@misty cedar https://discord.js.org/
@misty cedar https://discord.js.org/
@tired path How do you know he's using d.js?
Not everyone uses js
hmh
how do i
It's probably the fastest to get started
how do i
@misty cedar that website tells you
he sounds like he doesnt even know a programming language
Yup
he sounds like he doesnt even know a programming language
@quartz kindle correct
@misty sigil or any other language
@misty cedar have you ever coded anything before?
What do you mean I have to know how to program before starting a programming project
im listening to some really fucking lit bagpipes rn like i had to fix some music shit but i got cool bagpipes for it
im slow as hell i dont understand
im slow as hell i dont understand
@misty cedar you need to program the bot to make it do what you want
do you know any programming languages?
no
I'd suggest javascript, as thats what most people here can help with.
or if you dont value your life, go haskell
anidiots explains more, but yeah ^^
Cannot send an empty message
what could go wrong recommending haskell to someone new to programming?
im tryna dm a user
then your message is empty @zenith knoll
uh
seems like your sending an empty message
heres my code
why cant i be smart
@misty sigil Music boat is by you?
const Discord = require('discord.js');
const client = new Discord.Client();
const msg = require('./msg.json');
client.on('message', (message) => {
if (message.content.toLowerCase() != 'dmall' || message.author.id != '724066932701134979') return;
message.reply(`Please reply with the content you want to DM all with`);
const filter = (m) => m.author.id === message.author.id;
message.channel.awaitMessages(filter, { max: 1 }).then((r) => {
console.log(r.first().content)
msg.c = r.first().content;
message.author.send(msg.c).catch(e => console.error(`Couldn't DM member ${member.user.tag}`));
}).then(() => {
msg.c = ""
})
})
i did log it
YIKES

it logged the msg
@misty sigil Music boat is by you?
@tired path some of it, yes
i mainly needa fix error
k
i dont understand at all sorry if im being a pain but
i dont understand nun of this
i mainly needa fix error
@opal plank

yea ik dmalls are not allowed but a guy said for me to make it to prove i can code
moment
msg.c = r.first().content; this is likely undefined
wait

so i made it into a string json
you arent doing a mass dm command are you?
it just now clicked the name of the command
r
Dm All
mhm
it wont tho cxause it dms the author only
im tryn aprove to a guy i can actually code lol
module.exports.help = {
name: 'say',
description: "says a messages inputted",
usage: "ping",
execute(message, args) {
const sayMessage = args.join(" ");
message.delete().catch(err => console.log(err));
message.channel.send(sayMessage);
}
}
``` this works
i dont understand
but if you are coming here to ask for help, isnt that against the bet?
...:(
wel,llllllllllllllllllllllllllllllllllllllllllllllllllllll
bet?
i meannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
maybeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee :thonl


@misty cedar you didnt say anything
well backl to the drawing board
i need help ion understand any of it the guide is making my head hurt
console.log(r.first().content)
returns 's' bc i sent a s
but i cant send it in discord..?
log msg.c
console.log(r.first().content)
returns 's' bc i sent a s
@zenith knoll
i did
console.log
o
ok
@misty cedar we can provide help on what you DONT understand, i doubt many here will hold hands with you explaining the whole thing
@misty cedar You need to know a programming language.
The bot will do nothing when you have no code behind it.
The code interacts with the Discord API. This allows it to receive events and send data back to the API.
hello i need some advice on ws comm with nodejs and c#, i'm looking for a nice data solution, will xml do fine?
thing is c# doesn't natively support json, you need to install an additional package
i dont understand nothing
i'd rather do that nodejs side
then you don't make a bot 
but i need this
i guess it would be fine with xml, but like i said, i dont have experience with c#
what does it need to do
eh not c# specifically lmao
or i get fired because my bosses server pays me 10k robux ever week and if i cant get the coding he gonna find out the bots dont work and fire me
for now i'm just joining and splitting data into an array with strings but that's going to bite me in the ass
it already did
the usual consensus is using json as the data format to talk between apps
10k robux each week
yes
what a deal
thats what im saying
$99.99 every single week
you got 3 options
- learn how to make a bot and get one done
- buy a bot/pay someone to make one
- use free templates of bots out there
its genuinely the best advice that i can give
@deep tendon english
i 100% guarantee that nobody here will hold your hand throughout making an entire bot
@opal plank arabs
@deep tendon english only, arab => #general-int
is it just me or was stack overflow down for like 2 days now
i dont use stackoverflow nearly as often to notice

actually i think i used it 2 days ago, lemme check
seems fine to me @split hazel
is it fine now?
stack overflow devs when stack overflow goes down
unless my isp did some shit
look up this issue on stack overflow will you john
it happened with a few sites before
billy you fucking idiot its down
also this is giving me cancer
I heard C#
\x1b = ?
is that lolcode?
its working lolcode i made
lmao
thats all into 1 console log
epic
imagine not putting everything under a single console.log()
https://sourceb.in/c132deb387
help.js file where it's having errors
Can someone help me? thanks
Are we comparing loggers?
shit ones, yes
client.commands is a map?
p sure yes
not unles you me
actually
no
other way around
the guide recommends new Collection()
only hardcore users do Map()
no
Here is a logger i usually throw together
@quartz kindle https://6n.wtf/p/literallythebackend
oof
i wanna make a public paste service but database go brr
Works "
"
my turn```ts
public log(type: ILogType, ...str: string[]): void {
const time: string = new Date().toISOString();
let logStack = `${time}\t`;
switch (type) {
case ILogType.Info:
logStack += `${chalk.blue("info")}\t`;
break;
case ILogType.Warn:
logStack += `${chalk.yellow("warn")}\t`;
break;
case ILogType.Debug:
logStack += `${chalk.magenta("debug")}\t`;
break;
case ILogType.Error:
logStack += `${chalk.red("error")}\t`;
break;
case ILogType.Fatal:
logStack += `${chalk.redBright("fatal")}\t`;
break;
}
logStack += `${str.join(" ")}`;
}```
@misty sigil thats why mines private
private paste doesnt seem bad actually
Why not hare the logtype and the color in some object somewhere
And get rid of that switch/case
not that i have anything to paste in the first place
idk
You should look into that ๐
thats my best logger tho
make it better when you get a suggestion that allows it to be more maintainable
in other projects its just using some third-party logger or just logging straight to the console
what bot shuld i make
make it better when you get a suggestion that allows it to be more maintainable
i will make it better
I always implement my own logger
give me access to the pastes misly
once i make logins
pog
What if i want to make a new logger that sends PushBullet notifications to my phone or something 
my turn probably?
https://sourceb.in/c132deb387
help.js file where it's having errors
Can someone help me? thanks
I always implement my own logger
Well on JS I use that logger orconsole.log, on C++ I use third-party (spdlog or fmt).std::coutis hella slow
its not defined
here's another logger for a different bot
@craggy agate what is command.commands
Does anyone know how to use the vote webhook API? because I have absolutely no clue how to just make it so my bot sends a message to a user when they vote for my bot :/
JS btw
read docs
Maybe I'll make a brand new logger right here and now
Does anyone know how to use the vote webhook API? because I have absolutely no clue how to just make it so my bot sends a message to a user when they vote for my bot :/
JS btw
@sweet ruin it just sends a POST request
YOOOOO legit
Well on JS I use that logger or
console.log, on C++ I use third-party (spdlog or fmt).std::coutis hella slow
@restive furnace fmt isn't like "ready" to use, so I have to implement most of it tho, spdlog is.
cause i've read the docs but its euhm all confusing even to me
@sweet ruin top.gg's webhook is basically a POST request they send to the url you specify in your webhook settings, in your bot's edit page
oh crap so I gotta make a website with it
and code smth to read that?
basically, yes, you dont need a full website, but a small webserver to receive the requests yes
alright thank you! ill get to work on that
@misty sigil https://6n.wtf/p/literallythebackend i fixed the footer
๐
@craggy agate what is command.commands
it's the name of the commands(i have named it commands)
it's the name of the commands(i have named it commands)
likejs commands: 'help',in a command file
static class Factory
{
ILogger GetLogger() => new Logger();
ILogger GetLogger(Type type) => new Logger(type);
}
...
interface ILogger
{
void Log(string msg);
void Log(Exception e);
}
...
class Logger : ILogger
{
string name = "NA";
Logger() {}
Logger(Type type) { _type = type.Name; }
void Log(string msg) => Console.WriteLine($"[{DateTime.Now}] ({name}) - {msg}");
void Log(Exception e) => Log($"Error! Exception: {e.Message}");
}
c#?
5m for an abstract logger
Ye
Don't think I made any syntax errors either
Whoops, didn't allow the factory to pass in a type param overload
I omitted the privacy modifiers because, meh
My turn?
Sure. Implement a logger
logger?
lol
lol
I could also add a var _logs = new ConcurrentQueue<string>(); if I want to dump to a file at some point
I learned my lesson using non-threadsafe collections
commands is undefined
?
oh
say auger with a p at the beginning and an s at the end

๐
but yeah, make sure commands is defined
say auger with a p at the beginning and an s at the end
lmao













