#development
1 messages ยท Page 1419 of 1
yeah
Awsome, now log weathers
i did
It's not guaranteed that dmChannel is actually a DMChannel. You have to create one first with
<User>.createDM()
did you try this?
Ok so, weathers is an array of objects, which contain a cell_id and a weather number. You will have to iterate through that array to get the matching cell_id
weathers.find(obj => obj.cell_id === raid.cell_id).weather
for example
okay yeah i basically did the same for the pokemons.
you have to keep track of that yourself
var tmpWeather = weathers.filter(obj => obj.cell_id === raid.cell_id).weather
still returns undefined
or should i still have the parseInt in my function?
still have parseInt... but it shouldn't return undefined
owh i removed parseint sorry
var tmpWeather = parseInt(weathers[raid.cell_id]);
weathers.filter(obj => obj.cell_id === raid.cell_id).weather```basically like this, but this returns NaN again
find not filter
okay so
i found a way to get each message
but i dont know how to make it like oh this user setna message 70 times in 5 seconds
spam(message)
function spam(message) {
}
thats about as far as i got
var weatherString = "";
var tmpWeather = parseInt(weathers[raid.cell_id]);
weathers.find(obj => obj.cell_id === raid.cell_id).weather ```still NaN
Why are you still using weathers[raid.cell_id] ? weathers.find(obj => obj.cell_id === raid.cell_id).weather should be inside the parseInt function
owh fuck
Also you might want to use a map instead of an array for storing this stuff
makes getting things a lot faster
let filter = message => {
return message.content.toLowerCase() == message.content.toLowerCase() && // check if the content is the same (sort of)
message.author == message.author; // check if the author is the same
}
message.channel.awaitMessages(filter, {
maxMatches: 10, // the amout of time it checks
time: 5 * 1000 // time is in milliseconds
}).then(collected => {
});
would this work?
and how do i made it always check?
dont use awaitMessages
you can use the message event and just a simple map to check how frequently a person is sending messages
use the event
you are overcomplicating things
H
^^
hoW
awaitMessages is just a fat wrapper around the message event
I'd link you to the source but im on mobile and that's a pain
var weatherString = "";
var tmpWeather = parseInt(weathers.find(obj => obj.cell_id === raid.cell_id).weather );
this basically returned me a number
and i have these cases, but it is not changin to the correspondent weather type:js switch (tmpWeather) { case 0: weatherString += "None"; break; case 1: weatherString += "Clear"; break; case 2: weatherString += "Rainy"; break; case 3: weatherString += "Partly Cloudy"; break; case 4: weatherString += "Cloudy"; break; case 5: weatherString += "Windy"; break; case 6: weatherString += "Snow"; break; case 7: weatherString += "Fog"; break; default: weatherString = ""; break; }
console log tmpWeather again
after or before the cases?
Who knows dblpy api well pls answer in #topgg-api
doesn't matter
2
case 2:
weatherString += "Rainy";
it should return rainy
or wait
it should return rainy
i should use
tmpWeather
instead of waetherstring
oh
so i should call weatherString
as tmpweather is just a messenger between the parsing and the actual weather call
yeah it worked!
thanks man!
const background = await Canvas.loadImage('./wallpaper.jpg');
ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
ctx.strokeStyle = '#74037b';
ctx.strokeRect(0, 0, canvas.width, canvas.height);
// Pick up the pen
ctx.beginPath();
// Start the arc to form a circle
ctx.arc(125, 125, 100, 0, Math.PI * 2, true);
// Put the pen down
ctx.closePath();
// Clip off the region you drew on
ctx.clip();
const avatar = await Canvas.loadImage(member.user.displayAvatarURL({ format: 'jpg' }));
ctx.drawImage(avatar, 25, 25, 200, 200);```
How to bring logo in center
I have never used canvas
put ur switches inside a function and call it?
is there a way i can make it like oh they sent this message 5 times
you're using a canvas? why not just use HTML and CSS for that?
because maybe they want to post the result on discord?
ctx.drawImage(avatar, 25, 25, 200, 200);
25, 25
is where the upper left corner begins and 200, 200 is how big it is
((canvas.width / 2) - 100), ((canvas.height / 2) - 100)
should get it in the middle i think xD
that's why I asked them why not?
if it's a website, it's better to just used HTML and CSS
Why would you think they are making a website?
because they've talked about it here before
Thank you :)
I wanna just get output
as an image
alright
let filter = message => {
return message.content.toLowerCase() == message.content.toLowerCase() && // check if the content is the same (sort of)
message.author == message.author; // check if the author is the same
}
message.channel.awaitMessages(filter, {
maxMatches: 10, // the amout of time it checks
time: 5 * 1000 // time is in milliseconds
}).then(collected => {
});
i know thats making things over complicated
but how would i like log how many times each user sent the same message
save them in a map
so like if its ( 5 < messages) it would like do whatever punishment spesified
how would you do that???
someone told me that but i dont know how to make a message map lmao
๐๏ธโโ๏ธ
you know how to create a new Map() ?
const map = new Map()
and you done xD
its not a message map, its an empty Map, but u can save messages in it
and how would you do that
map.set(KEY, VALUE)
:3
you can store more than one value aswell
map.set(KEY, {id: userid, message: message})
uh
i would use userids for keys
Key is how you get data back
to get the value later on
so like quick.db
its stored in memory
create your Map on Bot start
bind it to your client/bot
you can call it each Time message event is triggered
im using Map to cache all the users i have in my DB to get the Data faster, its like the same
ues
for my message spam command and mass mention command
i have the regexs for the mentions but i dont know how to get ass messages and see if a users has sent a message more then the time the person decided
like
+message-spam on
and then they can do
+spam 10m 15s [warn/mute/kick/ban]
so it see if they sent the same message or a message 10 times in 15 seconds
@solemn latch
So I would definitely use a map for that, with a value of an array of Message spam classes.
hOw
i have never used maps before smh
let alone classes
not even sure how to store things in a map
or make a class
You can just follow https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
For every user who sent a message youd map.set(id, array)
Who isn't already in the map*
how would you intergrate that in the message event
Seriously just put it in the message event, after checking if they are in it.
what parT
check if a user is already in the Map with .has() if not add with .set()
map.set() or like
It would probably help if you read the docs i sent above. They are super simple once you understand them.
Map.set(id, value)
can be everything you want ๐
In the way I was saying, you'd have to make a class and set the value as an array with one instance of that class in it.
like in ur case the message.content and Timestamp maybe
But there's a ton of ways to do it.
i already looked at the docs
there are some good examples
i saw those
doesnt make since how you would put in a message event
._.
or atleast get the messages
in the unhandledRejection and uncaughtException events is there a way to get the origin of the error and log it, so far i have to event do the following but I also want it to log the error origin and line https://cdn.yxridev.com/u/91rmoUZc.png https://cdn.yxridev.com/u/OrFEW4f2.png
You are not getting the messages right now
You are just setting the users data.
so just map.set(message.author.id);
Yeah, so a class will build itself into whatever data format you want.
map.set(message.author.id, {message: message.content})
^ you can do something as simple as that for now
if you want to save the content
how would you make that like oh they sent this this many times
you can expand it to your needs
and then pull the message author id and spesify a punishment
then pull the messages and delete them
So, for now I would just worry about mapping the data.
You can just log the map
Not the place to ask
how would you log it
Console.log(map)
Uh
Not this server
I really need someone to make me smart board
@zinc fable
Are they scripters?
317418087714390016
For roblox?
They are scripters?
im not bean but yes
Ahaha
@earnest phoenix
@client.command()
@has_permissions(kick_members=True)
async def kick(ctx, member: discord.Member = None, *, reason=None):
if member == None:
await ctx.send("You can't kick nobody.")
elif member == ctx.message.author:
await ctx.send('You can\'t kick yourself moron.')
return
else:
await member.kick(reason=reason)
embed = discord.Embed(title="{} has been kicked by {}".format(member, ctx.message.author), description="{}".format('%s, you have been kicked by %s. Reason: %s' % (member, ctx.message.author, reason)))
await ctx.channel.send(embed=embed)
channel = await member.create_dm()
await channel.send(
f'{member.name}, you were kicked in the server by {ctx.message.author}.'
f' | Reason: %s.' % reason
)
```why is my kicking function not working
Thanks
Hmm
Please ask on the BDFD server, they'll be able to help you.
Or BotGhost, whichever that thing is, I can't tell them apart.
Map is empty after a restart tho
Ok thanks
but I don't know how to get in
I'm sure you can google for that, I don't have the invite.
probably on their front page
how do i add an 0auth2 login for my discord bots site? ive got the redirect link after authorising but it wont log me in... which idk how to do, is there any sources to help me with this as im really confused
if you're on JS and use express, look at passport and passport-discord modules, they're real helpful for that.
also see: https://www.oauth.com/
I mean, the back-end. You need a back-end to use oauth2 easily.
so, i tried require("better-sqlite3"); but i still get that db.backup is not a function
then you're doing python, look for an oath2 cog for that (or specifically an oauth2 discord cog, if there's any. I dunno, I don't do python)
mmk
better-sqlite3 doesn't have a "backup" feature.
ill look into the docs
yes it does
oh wait you're right
never used that one.
But it's not on better-sqlite3 it's on your initialised database.
const Database = require('better-sqlite3');
const db = new Database('foobar.db', { verbose: console.log });
https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options as indicated in the docs
you need to open your database file
ignore that it's just a client option. they're all documented on that page
db = new Database("your file here)
Good idea to read the docs before starting to program ๐
oh
that worked
thanks
but
how do i set an interval
so that
it gets a copy of the db
every week
or something
Anyone know how to make a snipe command?
because right now, its making a backup everytime i run the bot
i have one, why?
I wanna make one for my bot
look at node-schedule or cron for time-based intervals (on NPM)
I'm making a multipurpose bot. It's going to be apart of the misc command category
Discord js
simply use a map
listen to messageDelete events and simply map them based on channelid
whenever someone issue the command, simply see if theres an entry on your map with the channelid
thats about it
its legit 6 or 7 lines
on the npm package for better-sqlite3?
i found it, but i dont get how the time works
how can I do something like that in canvas?
var rule = new schedule.RecurrenceRule();
rule.dayOfWeek = [0, new schedule.Range(4, 6)];
rule.hour = 17;
rule.minute = 0;
var j = schedule.scheduleJob(rule, function(){
console.log('Today is recognized by Rebecca Black!');
});```
i found this example
but it does on 3 days
i only want it on one day however
also, wouldnt this not work if its in a index.js file
So keep looking at the docs? it should be there somewhere
then make sure it doesn't ๐
@sterile lantern get a vps, that is basics, you need a vps
u do realize theres still a possibility of it going down
its like
possible
so
im just bein safe
so ill run it 2 times per week
simple as use systemD or pm2 (not native, ewwwwwwwwwwwwwwwwwwwwwwwwwwwww)
anyone got exp with long running voice connections (discordjs)? bot sometimes stops responding to voiceStateUpdates randomly
what should i do
heroku apps to see what apps u have associated to ur acc
assuming u have the cli installed
i do
Not if you use a VPS
VPS(es?) do not have downtime
your bot will never be offline unless you make your bot offline
or you dont pay the fee
ok well
db.backup(`dbbackups/backup-${Date.now()}.db`)
this prints in numbers (theres a name for it i forget idk) but i want it to print like 113020.db
any meme api?
@void skiff you could use the reddit API and get memes from r/memes
maybe
u could also use redit
sounds good i already did something similar with reddit
i'm making the bot in java xd
This is for generating memes, not for getting a random meme

I cant help u cuz i code in python
113020 isn't unix time ๐
yeah i think that's milliseconds
oh lol
then look at 113020 again
Now that is a unix timestamp
There are plenty of modules that can help you format it, or direct code that uses Date.getMonth(), getDay() and getYear()
Which language ?
yeah but in case of a corruption dates r useful
js
node.js
create the app on heroku first.
I guess..
clearly the command line is telling you that you have the wrong app name
Just do like this
let d = new Date(UnixTime*1000)
wait what
huh ?
unixtime is not defined
You should already have it
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date Take a look @sterile lantern
go to Instance Methods
UnixTime is actually in seconds
new Date() takes input as milliseconds
Both from 1970
Date.now() //1606759761128
new Date() //2020-11-30T18:09:04.937Z
discord.js
@near stratus
const fs = require('fs');
const Discord = require('discord.js');
require('dotenv').config();
const client = new Discord.Client();
client.commands = new Discord.Collection();
const prefix = process.env.PREFIX;
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./commands/${file}`);
client.commands.set(command.name, command);
}
client.once('ready', () => {
console.log('logged in');
});
client.on('message', message => {
if (message.author.bot) return;
if (message.content.indexOf(prefix.length) !== 0) return;
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
});
client.login();```
yea
you're not doing anything with the command variable
you need to finish copying that code from the source, lol
what should i do?
git pull first, then git push
yep!
You know how to use JS date
Just format it as you like
cant you do git push heroku master -f
?
formatting is the only thing that needs to be done though? getting it in millseconds is not what he was trying to do
Gimme a minute I'll write the whole code
where can i find a good place to learn how to make a music bot in dpy ?
no I just don't understand what the point is in multiplying the date by 1000
seconds to milliseconds conversion
let UnixDate = 110000;
let d = new Date(UnixDate*1000);
let TimeString = `${d.getHours} : ${d.getMinuites};
console.log(TimeString);
@hollow sedge
yes, I realize what it is, I just don't understand why it's necessary
UnixTime returns seconds from 1970 to now
Date() uses milliseconds.
1s = 1000 ms
Do you get it @hollow sedge ?
but why even convert it to milliseconds
this is about formatting the date
not conversions
JS Date don't take seconds input
So I converted and made it my way
this works
but you need to call it
with the ()
for getHours and getMinutes
let UnixDate = 110000;
let d = new Date(UnixDate*1000);
let TimeString = `${d.getMonth} : ${d.getDate};
console.log(TimeString);```
would this work
so wdym
so you would do getMonth() and getDate()
oh
let UnixDate = 110000;
let d = new Date(UnixDate*1000);
let TimeString = `${d.getMonth() +1} : ${d.getDate()};
console.log(TimeString);
what's the whole point of this though
to print a date in a file
tf is commando
yeah, make sure to end the string properly though
this one works, but its new Date()
@sterile lantern don't forget month +1
commando is a shit command handler
can't you just use Date.now()
popular, but shit imo
where can i find a good place to learn how to make a music bot in dpy ?
they want to format the name of their backup
We're converting Unix > JSDate
yeah idk why they're doing that
let d = new Date(UnixDate*1000);
let TimeString = `${d.getMonth() +1} : ${d.getDate()}`;
db.backup(`dbbackups/backup-${TimeString()}.db`)```
this probably is very wrong
time string aint a function
but
file names can't even contain colons
yea
why are you doing this
ill remove the colon
literally format it with the unix timestamp
He's from CIA and asking for a new recruit
if you need to access the data, i.e. the month or something, read the files in another script and convert back the unix timestamp to a Date object
in the unhandledRejection and uncaughtException events is there a way to get the origin of the error and log it, so far i have to event do the following but I also want it to log the error origin and line https://cdn.yxridev.com/u/91rmoUZc.png https://cdn.yxridev.com/u/OrFEW4f2.png
oh wow im so dumb
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();```
this works
pog thanks
Bruh
let let let
ik you shouldnt use it but it still works
vars are hoisted
For beginners
no
var isn't stupid, it's just your fault if you use it and don't understand how it works ๐คทโโ๏ธ
i find it quite useful in some cases, i.e. loops
vars get hoisted
i think they're saying can you explain what hoisting is for beginners
let also works in loops
Var is when you are in the middle of the code and don't wanna scroll up to declare a global variable
anything you pass onto loops get passed along
if you're using var, 99% sure you doing shit wrong
Yea
one thing I agree
"don't wanna scroll up to declare a global variable" lol wth who is that lazy
I'm
who the fuck declares global vbariables?
let desc = args.shift().join(" ") ;
``` why wont this work?
the general rule of thumb is
const for variables that won't change their type & value
var for scoped variables
let for transient variables
is args defined
i believe
yes it is
why did you ake it like this at the end: ) ;
fixed it
.shift() returns the first Element from array, there is nothing to join?
like i said, you doing it wrong if you using vars on other loops
for passes the value on its own
Just keep using const and let
on one hand you are using vars wrong for 'being handy', on the other, you get bugs like these
https://cdn.discordapp.com/attachments/740216875572527106/770347665988780043/unknown.png
lmao
becuase they are hoisted and declared, you can call them without them even having a value
that moment you have bongo cat cursor
let works fine where we should be using var
var is only still a thing because of backwards compatibility
cuz millions of pages and js uses var from back then
when we didnt havet let/const
Var exists because beginners still use it
tl;dr, dont use var, regardless
wrong
var exists because it was the only declaration method before es5 iirc
after es5 let/const got added
var isnt deprecated yet because nobody is going to be rewriting the millions of pages out there
i'm aware of all of this, you should use var only if you know what you're doing and how its scoping works ๐คทโโ๏ธ
it's useful for top-level variables
if you don't understand it just stay away from it
in very specific cases, yes, which most people wont be using
out of everyone here i think theres probably 10 people maximum who could properly use vars
it's more of something you're going to see as a good pattern in the industry rather than on rookie bot developer code lol
fs.readdir("./commands/"), (err, files) => { Callback must be a function and got undefined?
I am quite confused.
so ive seen some stuff about eval commands? is that something that needs to be implemented ?
you're not passing anything to readdir, you closed the method
it's your bot, implement whatever you want
is there a reason to implement them?
or just a neat thing to have
for devs
latter
k
it's just running code on the go
mk ty
how do i make a mention prefix if i have a command handler
Did you google search before coming here buddy?
There are a lot of stuff that can help you.
this channel can be used for help though? And it's not like they asked "what is a variable"
the link inside of the bot submission page links to this channel
Is there a js function where even if one thing is false but another is true you do that other thing? Is that just with double pipes?
use an or statement
if (a=true||b=true) {
code
}
pretty sure it's called the or operator
or operator
yes ty
couldnt think of its technical term for a sec
No wonder my bot was not responding
const user = message.mentions.users.first()
if (!user) return message.reply("Please mention someone!")```
how do i determine if `user` is a bot or not, i only know message.author.bot
user.bot wouldnt work
Bot is waiting until humanity is restored
message.author.bot @sterile lantern
ownerId = ""
admins = []
support= []``` Would this work for a `Config.env` file?
bc i dont want them to give their money to a bot
oh
its a cmd
Free money for the bot though 
lol
well true but
i would just say that you shouldnt worry about that
what would da function be
if they give bot money, its their loss
Agree.
just exclude bots from leaderboards
im sure there is but i dont know of it rn
let me look
wait you said user.bot doesnt work?
do you get an error?
@sterile lantern
yes
... would you post it
very good
samm
uhhh
ownerId = ""
admins = []
support= []
discord_token = "haha nice try noob"
clientId = "nice try",
support_server_invite = "no",
bot_logo = "no",
Intents = ["GUILDS", "GUILD_MESSAGES", "DIRECT_MESSAGES"],
prefix = "^",
WelcomeEnabled = false,
WelcomeChannel = "welcome",
WelcomeMessage = "Hello {{user}}, welcome to {{server}}!", ```
Didn't work.
It's in a .env file.
let user = message.members.mentions.first(); if (user.bot) return;
@earnest phoenix your avatar looks more like an angry cyclops then barnie
lol
Logged error was video stream unavailable
I just wanna vibe
Using ffmpeg and ytdl-core
Hosting in france
but what if the bot doesnt like your music?
its NAME=VALUE
not NAME = "VALUE"
and not sure if it can store arrays
db.delete(`blacklist_${user.id}`, "Blacklisted")
y wont this work
if i did blacklist someone
its set
db.set(`blacklist_${user.id}`, "Blacklisted")
as this
yeah you might want to rename though
spam bot, bean bean
like Anti-Spam instead
i did
also you spelled "want" wrong where it says if you wnat to enable any of the features just do
but it looks pretty cool
...
I don't care give me a hug bish
Yay
conding in the shower sounds fun.
mobile/pc getting wet
steam getting inside the fans and frying the circuits
steamy display
wet hands not properly detecing inputs when touched/clicked
mobile/laptop slipping from your hands
soap all over the screen
yeah, overall sounds like fun
You could say that coding makes you wet
im always wet when coding
yes
i sweat hard thinking about the possiblity of people looking at my shitty noodle code
naked coding seems like a better time tbh
Your code is cute
but if you live with people and someone walks in its a bruh moment
Yeah it would be for me
But parents
Otherwise it'd be relaxing
good thing i live alone 
my code should be the dictionary definition of bad code
Have you seen my code lad
technically coding
just the WAYS we code
since its coding its technically development
I code
- poorly
- in 7 languages
its an important part of coding 
how do i add ffpmeg to the path on mac
i also code in various languages
-Camel and snake case mixed
-functions inside functions
-english
-engrish
-MyVarsNamesDontMakeSense
- random ____x variable names
-stoopid
-random html imported int he middle of ts code
-any's
-stooped engrish
-random comments from myself sayingWTF HAVE I DONE!?
thats my code 101
@earnest phoenix nano into /etc/paths
idk what that means @pure lion
open the console
ok
type sudo nano /etc/paths
ok
it said bash: sudo: command not found
krista are you trolling
"sudo"
why even sudo stuff
how would we write and in js like
if this === null *and* this == null
i dont remember what exactly it was
if (!this && !this)
if this and that
oh thanks
if this and that return IDAJOGJSF8WHD8SUSUSHSHSHHSSHSHW8JS8HEIRUEU37R7D7W7D
sometimes you dont want falsey
bad
If you're 
typeof this === "null"
you mean object kekw @pure lion
what if this is a string
So stfu
wdym
Anyway typeof returns a string idiot
I'm trying to say null is object
Wait it is?
the first red box is where i define everything the second one is where im stuck
since i have it sending the warning message
but i want it to send something else if it has sent the warning message
what is db?
@opal plank you're checking if typeof this is null
most db's need to query and are promises
no, you're going way over what they asked
@pure lion
uh db is the database i'm pulling the enable command from
:(
if(a === null && b === null) doo stuffies
most db's need to query and are promises
it does
what db is that even
im using my db MoonSQL and quick.db
because they have 2 different purposes
i use quick.db to see if it is enabled ect
you do know you dont need different databases right?
and moonsql for everything else
so i can host prefixes message events and run the bot using quick.db only?
whats the point of a database if you cant have multiple tables?
even stuff like redis which doesnt offer that has ways to avoid it
istfg erwin
it makes no sense to split stuff into different databases
it isnt about

my freaking database
and i asked you a question yet you still didnt answer

NO IM NOT ANSWERING
if(promise) //wotn work
if(await promise) // works
the db has nothing to do with the functions of the bot
THIS IS YOUR FIRST LINE FFS
rn the user argument is not optional
however, how would i make it so if they just did ;profile it would display their own profile and if they mentioned someone it would display the mentioned user's profile (basically making the args optional)
const user = message.mentions.users.first()
if (!user) return message.reply("Please mention someone!")
if (user.bot) return message.channel.send(`Bots do not have a profile. Try mentioning an actual user next time.`)```
ERWIN LISTEN
I AM, YOU AINT
ping if u respond
NOO STFU AND LISTEN
@sterile lantern Like const user = message.mentions.users.first() || message.author?
WHY NOT JUST ANSWER IT THEN?!
I NEED HELP WITH THE MAPS
IS DB A PROMISE?
hey how do yall get your code to be colored in the ``` ``` (code block)
CAUSE IT DOESNT FUCKING MATTER SMH
Yeah that should do the trick
you know what
THEN WHAT IS THE ISSUE FFS

IF I CAN HAVE IT SEND TW DIFFERNT MESSAGES
BASED ON WHAT!?
worked tysm
MAPS
ITS NOT RELATED TO MAPS
IF IT SENT THE WARNING UR SPAMMING STOP OR GET MUTED U GET MUTES
IT IS LITTERALLY MAPS
WYM
guys wtf
IF(MAP.HAS(ME)) {
MESSAGE.CHANNEL.SEND(MESSAGE1);
MESSAGE.CHANNEL.SEND(MESSAGE2);
}

UR QUESTION MKES NO SENSE REE
why caps spam?

ITS MAPS IDIOT
I NEED IT
how do yall get your code to be colored in the (code block)
TO SEE IF IT ALREADY SENT THE WARNING MESSAGE
heck
define a language
AWAIT IT
no work? @earnest phoenix
LET A = AWAIT MESSAGE.CHANNEL.SEND('HI');
IF(A) //ALREADY SENT
how?

I WANT IT TO SEE IF IT SENT THE WARNING MESSAGE FIRST AND IF THEY KEEP SPAMMING THEN MUTE
OH
OK
put the three ` and then the markdown language you want... best is to google "discord markdown" ;)
BRB
```cs for csharp
```js for javascript
etc
YOU'D NEED TO SAVE IT SOMEWHERE
Erwin can you chill the fuck out
ADD THAT TO YOUR USERSMAP OBJECT
no can do

dw dev senpai

GUYS GUESS WHAT
IM GREEEEENNN
AYEEEEEE
your cursor is banging bongo cat or your cursor IS bongo cat? phrasing matters
gg
hmm
like it moves
okay cuz thsi makes room for arguing
HA
idk, u the one who said it
you just now got it lolol
stfu
fuck idk what to code now
I WAS LIKE "whats wrong with it"
lol
Welcome to #development guys
yesh
thats the one territory i dont fuck with
sharding? fine
mass webscaling? fine
crosschat and multiple platform bots? fine
music bots is a territory no man should wonder
honestly small scale music bots are fucked
@slender thistle show yourself
youtube placed such restrictions that small bots can't afford to go around them
ipv6 routing
opus
lavalink
ratelimiting
api keys stored and dbs
its all a mess and a half
you cant scale music bots easily
while older bots which grew bigger had enough time to profit enough to be able to efford everything erwin stated
@pure lion imma probably going to stream code in that other server, feeling like coding for a bit
original code:
if (!message.mentions.users.size) {
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL({ format: "png", dynamic: true })}`);
}
const avatarList = message.mentions.users.map(user => {
return `${user.username}'s avatar: ${user.displayAvatarURL({ format: "png", dynamic: true })}`;
});
new code:
var avtEmbed = new Discord.MessageEmbed
if (!message.mentions.users.size) {
avtEmbed.addField('\u200B',`${message.author}'s avatar:`,false)
avtEmbed.setImage(message.author.displayAvatarURL({format:"png", dynamic: true}))
}
else {
const avatarList = message.mentions.users.map(user => {
avtEmbed.addField('\u200B',`${user.username}\'s avatar:`,false)
avtEmbed.setURL(`${user.displayAvatarURL({format: "png", dynamic: true})}`)
});
}
message.channel.send(avtEmbed)
(im changing all my commands to embeds)
The one that sends your own if you dont mention works, but the mention doesnt
@slender thistle ask a mod to put STOP USING VAR in topic pls
var Discord = require("discord.js")
Nobody asked
ok well the problem isnt the embed
i think its the third convo ive had in the past hour about var being bad
wow toxic
That's a read-only so const is pog
var -> when doing stuff what works in IE9
const/let -> when doing stuff everywhere else








