#development
1 messages Β· Page 1235 of 1
can I code a discord bot in batch
Yes
I mean
Shell scripts are more for orchestrating other binaries
@faint prism u got any c# bot library recommendations. there are like 3
they all look equally as bad
Discord.net is the only viable option
ok thx
is this correct?
if word 'og' is in var badg?
or do i do == true?
hey anyone in #topgg-api ?
someone answered your question
?
this is my code
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
and no errors
its just not pasting in the icons
python and pillow
hm well
.xyz domains look good & are dirt cheap

a lot of services rank xyz domains down or dont accept them because they're used for tech support scams to the point it's insane
i believe google knocked down the SEO of sketch tlds like xyz a few years ago
dk if they're still doing it
wait what?
a tip for your sanity
don't bother with word filters
and the way you're doing it right now is bad
Word filtering?
Yeah profanity filter
Thank you
doing sql calls is one hell of a waste
lmao pog i make da wae censor bot
no
i mean
u can make ur own filter with my code
but uh
Show @earnest phoenix da wae
it's a lot of work lmao
is that ads? 


@faint prism love mobil3 dev
how do i make like bascily a var that is like mentioned user id or if mention user not specified
just send the author;'s id
Hi, i have a problem hosting my bot in a vps. It says 'Error: Cannot find module './handlers/Commands' but i don't have any errors in my local. It just pops up when i try and make my bot online in that vps
The remote VPS probably isn't sync with your local // has the file your local has. You could see for yourself by looking in the ./handlers/ directory remotely.
Hmm i don't understand the second part, sorry
your remote vps probably does not have the same file structure as your local directory
there seems to be a missing file on your vps
But I have already uploaded everything
is that what it's supposed to be
Yeah
Oh hold on
It works now. Thanks
Also about the slowmode command, how do i remove it
i have good news or probably bad news, i dont know
my phones downloading a custom os and idk
tried booting into recovery mode and came across that
f
Ree
How do i fetch all users from all the guilds my bot is in? client.users.cache.size only caches online users, would appreciate some help
So how do i get started making a bot?
Is a certain format i have to use or somewhere i have to go first?
So how do i get started making a bot?
@earnest phoenix It says how to start making one in #502193464054644737 π
Ok thx
So basicly in python I need help making a thing where it gives me the member mentioned Id if I were to do like .profile @granite pagoda
And if I donβt specify the user, it gives me the authors Iβd
Id
Ping me please
@hazy sparrow it is
oki thanks
what about
<set>.add()
ok nvm got it
const db = require("quick.db");
const cooldown = new Set();
const cooldownAmount = 3600000;
module.exports = {
name: 'work',
description: "flip a coin!",
execute(message){
const expirationTime = Date.now() + cooldownAmount
const now = Date.now();
if(cooldown.has(message.author.id)){
const timeLeft = (expirationTime - now) / 1000;
message.channel.send(`You have worked recently! Please wait ${timeLeft} seconds before you can work again!`);
}
else {
const bal = new db.table(`${message.author.id}mybal`);
db.add(`${message.author.id}mybal`, 2);
message.channel.send("you got **2** bowbucks for working");
cooldown.add(message.author.id)
setTimeout(() => cooldown.delete(message.author.id), cooldownAmount);
}}
}
help? these are 10 seconds apart
should i wait an hour and try?
isnt the amount set to 60 hours
nvm it is im just heavily blind
lol
kk
oh wait
const expirationTime = Date.now() + cooldownAmount
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ im dumb
is this channel discord.py related?
its for anything which is related to bot development @lethal raptor
^
oh
So, I was thinking to make community currency which will be used on my community bots, but according to the rule of top.gg vote's rule no.3 at top.gg/api which is "Bots should not be rewarding users for voting for another bot. E.g if a User votes for Bot A they should not be receiving Bot B's currency" it seems makes me unable to do so, because if user vote for a bot, he/she will get the community currency. So, what now?
did I just misunderstanding the rule or what?
it means that for example you are not allowed to vote for dank memer to get owo bot's rewards
how if dank memer is a part of my community bot, and dank memer related to the community's currency, so it's currency basically used my bot's currency which is community currency as well?
doesesnt matter, if its not the bot which is giving you rewards for eg you can only vote for OwO to get OwO's rewards even if its related to dank memer/dank memer's currency thingy
Ok, thank you. I think I need to do some research.
guys i need a way to find out the last time someone did a specific command for example !ping, I have no idea how to store it with quick.db, any ideas?
why not mysql?
Do you want it persisted across restarts and such (aka do you really need to save it in your db)
The way you'd do it is to save the user ID, the command name, and the timestamp.
store the unix timestamp of when they exexuted the command
okay, thanks!
ok guys. QUICKDB or MONGODB. which is better, more secure, easier, and faster
db.add("cooldown", now)
^ i want to get the last time it did that
probably going to say mongodb, but I've only ever used sql
@near veldt quick.db is easier
quick.db uses sqlite under the hood and is "easier" I'd say
before i switch to using quick.db, does quick.db feature per server settings like prefixs n sutff?
yes you can do that
no db will feature that, it's something you implement yourself
^
yes we call those tables
@hazy sparrow your architecture is very weird, do this instead; have a db named cooldowns for example
add a key userid_commandname and for the value add your unix timestamp
idk what u just said parmesan
a db is a way to store something
@earnest phoenix i alr have a table named cooldown
ik what a database is
you implement the functionality of actually storing stuff like prefixes
r u being serious rn?
@near veldt he means that you have to code it yourself and cant just like press a button for that
lol no shet shirlock
then why tf did u ask it

you put the stuff in and tell the database how the stuff is ordered
i was asking whether or not if it was possible to have per server settings using quick.db
it is
of course
ok
yes it is,
any db can do that
it is withbany db
thats what i wanted
^
thank u people
welcome person
for reference those are called tables
in an sql db
how do i get the date of the last time a part of the code was executed?
i told you what to do
your architecture is very weird, do this instead; have a db named cooldowns for example
add a key
userid_commandnameand for the value add your unix timestamp
@earnest phoenix
it's alright
ok i did a quick search on it and got it now, thanks
Is it possible to inject your own code into minecraft using java asm?
I dont know about injecting to a normal minecraft instance, i've a feeling not, but i know you can create your own class loader app and "inject" into that directly since it's right on the app
Help me with my bot pls
sup
@torn ravine ye- i mean no
?
@oak cliff link, hoister
Or whatever lang
Wait right there
-faq 13
Oh
@pure lion then?
@cinder olive read it 
Okeh
Dead chat
Ok
I'm 13 too
If you think you're too dum then don't do this yet
I am 13 and i can code in java and typescript 
I know 4 langs >:(
I dont even get what that is
Bruv am I the only one who is older here ????
All you need is the basics
Oh, you want the actual lidt?
Please keep this channel on topic:p
lua, java, javascript, typescript, C#
Anyways
Back to dev
to show nitro
@blazing ravine theres
Uh
Bruv am I the only one who is older here ????
@earnest phoenix mhmm old old old old mhmm 3000 Years Old?
how to check some1 have nitro with flags ?
GuildMember
There's no way to
I'm going to learn C# but I don't know what the fuck to do 
^
No
Stop spamming
@cinder olive learn coding
Someone already gave you your answrr
@earnest phoenix mhmm old old old old mhmm 3000 Years Old?
@cinder olive I am 20
π π π
@earnest phoenix I just said keep this channel on topic
Or you can pay me 10$
I DONT WANNA LEARN SCHOOL EVEN THAT CODING
;d
Please move on
Or you can pay me Β£5
@oak cliff you look angry is everything ok?
Gettin nitro status isnt possible at this stage
π π π
but some1 getting
i cant wait for net 6 to introduce java interop, it's literally going to make c# one of the most powerful languages
@restive shell
For some reason discord dint allowed it
ahm
@blazing ravine they probably check it using boosting since
ye
@cinder olive we are not going to spoonfeed you here. You'll need to learn yourself
let me try
That doesn't tell nitro for sure tho
Ywah
It's better than nothing
You can check discrims ig
@golden condor nah m8
Like have a list of nitro discrims
But it will sometimes return false positives
@oak cliff ...
rip discord.js
Yes i eanna make a bot
Oof
Since we cant get boosting
HOW CAN I EDIT IT
@cinder olive shut the fuck up
-faq 3 @cinder olive
@cinder olive
HOW CAN I MAKE IT
Search up youtube
...
Search google
Read that first
I know this is a big question, but how would you go about making a simple webpanel for a discord bot?
We are not your personal coding teacher
FUCK THIS
@dense nest you start by learning how to link your bot with your website
@cinder olive stop spam
-m 679272530699091968 decided to have a tantrum and spam after not being spoonfed code | 1d
π€ Muted ! Maple#7646 (@cinder olive)
@cinder olive casually has a mental breakdown
If you get the hang of it you can move to learn html and css
I know html
maple have problems xd
I have a website setup
Then if you really get the hang of it, move to hosting server
I've made a flask webserver for my bot
My code: ```py
import dbl
import discord
from discord.ext import commands
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def init(self, bot):
self.bot = bot
self.token = 'token' # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes
async def on_guild_post():
print("Server count posted successfully")
@commands.command(
aliases=[
"ΡΠΎΠΏΠ³Π³"
]
)
async def topgg(self,ctx):
dbltoken = "token"
topgg = dbl.DBLClient(self.bot, dbltoken)
l = await topgg.get_bot_upvotes()
g1 = l[0]
g2 = l[1]
g3 = l[2]
g4 = l[3]
g5 = l[4]
emb = discord.Embed(title='Last Votes', color=0x147DFF)
emb.add_field(name=f"{g1['username']}", value=f"{g1['id']}", inline=False)
emb.add_field(name=f"{g2['username']}", value=f"{g2['id']}", inline=False)
emb.add_field(name=f"{g3['username']}", value=f"{g3['id']}", inline=False)
emb.add_field(name=f"{g4['username']}", value=f"{g4['id']}", inline=False)
emb.add_field(name=f"{g5['username']}", value=f"{g5['id']}", inline=False)
await ctx.send(embed=emb)
def setup(bot):
bot.add_cog(TopGG(bot))
My error: Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f81ecab3e80>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f81dbdc79a0>, 26.822597434)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f81f9069b70>
why not
SPAs are literally the future of the web
Cuz i dont do frontend

oh
lmfaoaoao
I only do backend
I suck at design
Soooooo
full stack gang
I have an SPA and I'm having a hard time optimizing it for search engines
@dense nest problem?
@late dove replace 'token' with your actual token
i need to cover a bit more devops fields and then i can actually call myself full stack
Not really, just, like im thinking of having the webpanel just change the prefix to start with
My token is here (I don't wan't to show it)
@cinder patio yeah that's a huge disadvantage to client side rendering an SPA
Just no idea where to start π
Done
And setup link to your discord bot application idk
You can use something like glitch if it's just static ig
Oh god
@golden condor calm the fuck down
Dont start an arguement
Its just a fucking joke
For developement not prod, he can use glitch
Anyone knows why this happens when I try to use typescript? My config file looks fine, and I've used the same config before. The only difference this time is that I'm using webpack as well, but the same error occurs even after I delete the webpack config
Uh
empty path
Ye
wth happened here
console.log("Hello World!"); That's the only code I have right now since I just started setting up the project
f
So it appears to be an error with the config but
I don't see anything wrong with it
you need to specify the path
um
Sent everything BUT the exception itself
^
I already have both an outDir and rootDir path specified
those are the only ones I need
cloudflare fucked you over essentially
lol right
They aren't letting you connect to the gateway for whatever reason, such as you sending a large amount of requests
I don't even use cloudflare
???
Discord does
no, cloudflare is a system used to block DDoS attacks n such
To fix
it prolly thought ur bot was a DDoS attack or sum
Loool
you probably abused the api
yes
Maybe it was my mass role command for my server
cuz i saw 604 lines
602 lines @near veldt
holy
Ya
moly
I dont use cogs
w h y
every mass command is considered as api abuse if not handled correctly
i'd recommend shipping every command u have into its respected folder/file n what not if u havent already
Ye ima try to get familiar with cogs
cogs are literally same as you did it in mainfile, just a bit different naming.
like @<client>.command is @commands.command
if u used js, i think i'd b able to help u
Discord.py has docs how to do it
Will this affect my other bots?
no
Ok good
Because I run 2 EXTREMELY important bots
And I can't afford them not to work
Especially my main bot witch has this cloudflare issur
Bc it might get reviewed soon
if they aren't running on same repl (i assume you using repl.it, since that screenshot looks a bit like it), then it won't affect them.
Yes
If you manage to not fail at implementing cogs, no problem
then don't fail :)
Why not run a separate repl with your application, just running under a different token
It's not the end of the world if you have to wait another 3-5 weeks, you could spend that time adding more stuff
woah
True @pure lion, it's just annoying lol
Why not run a separate repl with your application, just running under a different token
^ aka "development" bot
Having a testing environment is nice and you should get used to creating one for projects that you may want to scale to public
How would it get tested instead of the one i currently have in queue
Why would it need to be tested?
It really is
where did u find this at
-dOtPoSt ok good
OH MY GOD REPL.IT MADE A DATABASE
(which is basically quick.db)
@earnest phoenix name?
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
1: 0xa093f0 node::Abort() [node]
2: 0xa097fc node::OnFatalError(char const*, char const*) [node]
3: 0xb8407a v8::Utils::ReportApiFailure(char const*, char const*) [node]
4: 0x7f56fa5ed45b Image::SetSource(Nan::FunctionCallbackInfo<v8::Value> const&) [/home/runner/codeco-discord-bot/node_modules/canvas/build/Release/canvas.node]
wut? I literally copy pasted my own code and modified it but it throws the above error.
My code:
exports.profile = async (message) => {
let canvas = createCanvas(1000, 500);
let ctx = canvas.getContext("2d");
let userImage = new Image();
userImage.onerror = err => {throw err;}
userImage.onload = () => {
let backgroundImage = new Image();
backgroundImage.onerror = err => {throw err};
backgroundImage.onload = () => {
ctx.drawImage(backgroundImage, 0, 0, 1000, 500);
ctx.drawImage(userImage, 50, 50, 450, 450);
let attachment = new Discord.Attachment(canvas.toBuffer(), "profile.png");
message.reply(attachment);
}
backgroundImage.src = "https://cdn.pixabay.com/photo/2016/09/08/22/43/books-1655783__340.jpg";
}
userImage.src = await message.author.avatarURL({ format: "png", dynamic: false, size: 4096 })
}
(just a test i'll be adding more stuff later on)
@pale vessel
Image::SetSource
you can't give urls to those (image.src = url), you need to use loadImage for that
get the url as buffer or use loadImage()
loadImage does the same thing though
loadImage uses simple-get and get the buffer iirc
never mind
you have so many onload it's confusing
if you can use await and loadImage it would have been so much simpler

I have a guess
@pale vessel wait the background image is JPEG and the user avatar is PNG will that cause any problem?
no
but i should http://tryitands.ee
Remove the await. avatarURL returns a string, not a promise
And also, maybe set the size to a smaller number
Someone get me the ID of the owo what's this emoji please
Ty
I think using await automatically wraps the returned value inside a promise
wait a minute
he used await
why didn't he just use await loadImage, you can just omit the image load events
finally
It's the size right
yep i used the user avatar as the background for testing
It's the size right
@cinder patio haven't tested that
let's go for 4096 bois
@pale vessel what's teh actual name of the owo emoji
owowhatsthis
viruses are cool
bruh why windows anyways? π€
yes
linux better
Bruh just use Minecraft command blocks
LoL
windows 7 officially hit end of life
Rip
i think windows 8 suck
@earnest phoenix now read the reactions
i think windows suck (for development)
But they're like 3$ on ebay
yikes
I USE A SHARED PC BOIS I CAN'T DO ANYTHING TO MY COMPUTER RELATED TO OPERATING SYSTEMS
uhhh
xD
i think windows suck (for development)
windows is extremely flexible for development
use dual boost
it just depends on which tools you use
use dual boost
@earnest phoenix rockets powered by Linux intensify
@earnest phoenix but linux has better command line
and Mac 1
well true, but it's not simple as in linux, like single command to install development environ
2*
Bruh it's just an operation system, you're programming, not playing Minecraft in seus shaders
win10 has WSL2 so that arguments falls down the drain
but linux has better command line
@earnest phoenixhell no
Cmd in windows 10 is hard to learn
my windows version doesnt have yet, since they can't support my pc lol
did someone just try to argue that linux is simpler than windows
did you not understand what i said
lord help us all
windows 10 b2004 has WSL2 support
you straight up dont have to use dos at all
This doesn't look like discussion about bot development to me.. odd.. 
im on win10 1980 iirc
boy.login(token)
Cmd in windows 10 is hard to learn
@earnest phoenix not like i made a whole trivia game in 7 days of learning it without even guides
chatting about (bot) development
This doesn't look like discussion about boy development to me.. odd.. :yert:
@earnest phoenix it's not aboutboydevelopment it's aboutOSs
Or u can install linux subsystem
:))
i have WSL1

but can't get WSL2
LoL
update to 2004
it's a big boy update
let's stop this discussion (cuz i need help with canvas)
mainly because of WSL2
Canvas makes my brain explose
so bye
Bruh we went from canvas issues to operating system issues
Canvas makes my brain explose
@earnest phoenix explode or expose
well, the thing is, windows doesn't support my setup
expose
Bruh we went from canvas issues to operating system issues
@earnest phoenix now we're gonna get to pinging tim issues
2004 update
So is my bot unusable then?
@restive furnace just install windows update
then u can update it
if u are on crack version
u need to reinstall
windows 10
@restive furnace is my bot unusable then? Since the cloudflare fuckover
he abused the api
Not the gateway
Lol*
cloudflare can sometimes just kick you off the gateway connection
because it feels like itβ’οΈ
90% of website has cloudflare
what
wait does Cloudflare has AI to kick ppl ??
no
uhhh
Can I use Pixabay images in my bot (non-commercial use) without attributing the image creator? I hate copyright more than life.
Discord gateway just kicks you off when it feels like it
β’οΈ
xD
Discord
β’οΈ
stable (β’οΈ)
Discord is a stable platformβ’οΈ
Can I use Pixabay images in my bot (non-commercial use) without attributing the image creator? I hate copyright more than life.
we donβt know
yep i know i am repeating questions cuz yes
ask them
tmw discord gateway is actually rlly stable you all just smell
they don't give their email
@earnest phoenix They're doing barbeque on the servers
I'll just attribute the creator
if the image is tagged with the CC license then you may iirc, not sure
Lmao
the stench alone is enough to drive cloudflare away

The w o t
never had an issue with discord gateway tbh
When search in google i search only for uncopy right images
:))
i wonder what dumpster fire their backend is now that they started implementing hooking into / commands and interactive ui elements
so xig is on 24/7 the gateway just runs away normally
discord.js handles the gateway like hot fuckin garbage and sets a bad rep for discord
plz link me the MDN docs on drawing text on canvas cuz the search button never gives correct results
discord.js handles the gateway like hot fuckin garbage and sets a bad rep for discord
@slim heart say that in djs support server
xD
discord.js handles the gateway like hot fuckin garbage and sets a bad rep for discord
@slim heart That's just, did you hack into the mainframe to notice
I really donβt get problems with it using light
Cuz i can't see signs of it's handlers being broken
djs swallows all gateway errors you get
and acts as if nothing happened
lol
guess what
lol
wrong
And where do they go after being swallowed
it acts as if everything happens actually
and then it looks like ur bot is constantly restarting
so now ur like "oH DiscoRd GatEwAy StiNky"
but its just djs being fuckin stupid and treating normal sometimes even scheduled things from discord like errors
there was literally someone who done this
try{
//code here
}catch(err){
throw err
}``` like what
there was literally someone who done this
try{ //code here }catch(err){ throw err }``` like what
@misty sigil every code
like ceery command
why are u try catch but then throwing the error back out
brain
I use a webhook
It be like
try {
// Your entire fucking JavaScript code
} catch(err) {
function abort(error) {
process.exit(69);
throw new AbortError(error.stack);
}
abort(err);
}```
Lmai
for about most logging things
js doesn't have goto unfortunately
but imagine it does 
retry:
try {
throw new Error();
} catch(err) {
goto retry;
}
ikr
@misty sigil uhh maybe i should switch to webhook
itβd make so many things easier
yes
function init () {
try {
throw new Error();
} catch(err) {
init()
}
}
Can I send all of the http status codes 
no
:(
function init () {
try {
throw new Error();
} catch(err) {
init()
}
}
@slim heartjs RangeError: maximum call stack size has been reached
lol
xxx
there, all of them
teapot cat
xxx
there, all of them
@earnest phoenix what about 1000 class errors
shit arenβt they cf only
ill do it
do it in the discord console and watch it crash 
wut
How 2 open
Oh
Wai-
Do that in it
discord is electron
and electron is just chrome
that is dev tool
pog
uhhh
Wait
What if you redirect from the console 
before it rangeerror'd
What if you redirect from the console
@pure lion you dont even have to redirect anything
it's just simply in memory
lmfaoao
ctx.strokeStyle = "white";
ctx.fillStyle = "white";
ctx.fillText("Galaxy Image provided by Pixabay",500,450);
Why does this draw the text as some box thingy which Unicode puts to denote that the symbol cannot be displayed
Memory registers goes brrr
the token is standing there in memory, unencrypted, so a malicious program can straight up scan discord's memory for the token
well isnβt that 5head
uh
no
its still an application
which cant be touched by other apps unless given admin which still might not even work since electron cookies are technically marked as secured info
cookies
kernel call to ReadProcessMemory
you cant call kernel without admin 4head
smh
it belongs to a different application its like the basics of memory lmao
yes
but you're implying that people are smart enough not to give every app admin rights
its as protected as can be
(or not, because electron so the token's being kept in the auth header)
still separate data
in fact no
the auth header is not used at all in website stuff
and token is cleared when logging into the client
no no, i meant the networking tab in dev tools
so in fact it isnt stored anywhere lol
thats protected behind a slew of things in front of the v8 engine
im wondering if the token is there before you open dev tools
ping pong I steal your token through requests :p
no
you have to record network activity anyways
the secondu close dev tools its cleared, and it isnt logged until u open dev tools
/[MN][A-Za-z\d]{23}\.[\w-]{6}\.[\w-]{27}/g
doesn't account for mfa tokens smh smh
ok so if(msg.content matches that regex)send to my server 
in theory you can straight up just
make a userbot that listens to messages here and nukes bots whenever their token gets leaked don't do it that's against the tos
yea it is
ikinda wanna put a listener on my bot and just see if tokens get leaked anywhere lmao
it works without the dev console
hm
so
after x amount of time it gets cleared from memory
but when you make any kind of a REST request with the client it's back in memory
mmmm......................
ctx.strokeStyle = "white"; ctx.fillStyle = "white"; ctx.fillText("Galaxy Image provided by Pixabay",500,450);Why does this draw the text as
some box thingy which Unicode puts to denote that the symbol cannot be displayed
@pale vessel i removed the strokeStyle and fillStyle stuff so it uses the defaults but it still shows likesome box thingy which Unicode puts to denote that the symbol cannot be displayed
Need help whene u try to put yourself into afk it automsticly sdays u just comed
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I see this in the console: Fontconfig error: Cannot load default config file
d
-dpost
@pale vessel i removed the strokeStyle and fillStyle stuff so it uses the defaults but it still shows like
some box thingy which Unicode puts to denote that the symbol cannot be displayed
@earnest phoenix repl doesn't have any system font so you have to download a font and register it first
I want eval code only 2 ID shard,This broadcastEval() evaling all shards.How make to only shard 2 eval?
@earnest phoenix Eh not really what I had in mind
@faint prism how would u go about doing it? theres just gonna be 1 ELO check and if it doesnt find someone in a certain amount of time it just picks 2 people randomly
I want eval code only 2 ID shard,This broadcastEval() evaling all shards.How make to only shard 2 eval?
@grim mesajs <ShardingManager>.shards.get(1).<method>
@earnest phoenix spoonfeeding

One line is not spoon feeding

smh
How many times i gotta say this smh
How many times i gotta say this smh
@earnest phoenix you never saidthis smhyou always write full sentences
Wot
yeah, what's wrong with that, writing full sentences?
Fairly sure spoonfeeding is just giving big snippets of code
We don't mind one-liners, but it's appreciated if you explain it
One day is gonna come when people gonna say
Map.prototype.get()``` is a spoonfeed
Wtf
Hence why we don't encourage minimodding
The thing is, telling someone to not spoon feed is not even a mod action, somebody is doing it let them be
In the end it bites you in the ass if you spoonfeed :^)
Unless they're writing code that's like longer than your life span
lmao
i like to write big blocks of code for people to explain them stuff, atleast there is some use of my absolutely terrible programming skills
I feel like I should write a proper OAuth token refresher that pulls it from a .json file instead of refreshing it on each restart π€
I hate it when people tell you to explain how something works instead of spoon-feeding, well good luck explaining how a shard manager is constructed or even a reaction collectors works through collections
Hmm. Storing unix timestamps might be a good idea for this
hey guys how do i get these flags before the country name ?
like i already have a code that does the exact same. Searches countries and their coordinates
Which profile card do you think is better?
https://cdn.discordapp.com/attachments/750091983191670805/754259201508769822/profile.png
or
https://cdn.discordapp.com/attachments/750091983191670805/754259730641322014/profile.png
they both look ugly
wtf
They're literally emojis available for you to use @eternal osprey
@earnest phoenix srry to break it to you, but i do not like any of them.
yeah
also, what in the fucks name is going on with your name font.
that code 913 looks so bad
go for flat design, poppins font + high weight for title headings and headway font for other text
yeah
i used comic sans MS for the font any questions?
Just spam Gen Z emoji memes 69/10
also use glow if you have a darker background like this.
Don't be lazy if you want proper profile cards
Hello, pls help, i am creating music bot, i am installed ytdl-core ffmpeg-binaries and more.. but i am write -play (song name), in console error "No video id found"
code
Look up fonts, see which ones may be suitable for your use case
Just catch the request error and return it as a message
yikes are you just trying to get video data from your arg
but i cannot use normal emojis voltrex.
you need to input a video id, not your search query
i have a weather search fucntion, like $po sunny. It will return a list of countries with sunny weather, but that changes all the time,
you need to input a video id, not your search query
@earnest phoenix ok, but how to get video id?
so i cannot just add emojis.
but i cannot use normal emojis voltrex.
@eternal osprey Wot
should i just pastebin my code so you know what i am talking about?
Bruh? @eternal osprey
These are the emojis, or i have no idea what you're trying to say
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
look
the countries in the embed change all the time
depending to their weather atm.
the flags are just regional letters for the country ISO code
you can probably work with that
so i cannot just add a emoji of france in the embed, because maybe in an hour it stops raining in france and it is out of the embed.
hmm wdym?
add the emoji inside the name
but wouldn't that fuck up the weather search?
i'd do like :flag_us: Name and use name.split(": ")[1]
πΊ πΈ
on their own they give this
πΊ πΈ
combined, they give this
πΊπΈ
πΊπΈ (πΊ and πΈ )
uhh
owh okay
imagine what disaster it would be if normal letters would be parsed as flags
Flags go π§π·rrrrrr
π§π·rrrrrr
π³π΄ooooooooooooo πͺπΊ
woooosh
hey it works
but how do i make it so
that if the coutry is like spain
it gives the flag of spain?
get the ISO code of the country
okay but the places of the countries in the embed change all the time.
so i can add a flag of a country in the embed
but in an hour it might not be there anymore
How long Bot List Approving is?
get the ISO code of the country
i just told you above how flags work
they're 2 regional letters
those 2 letters are the ISO code
How long Bot List Approving is?
@hybrid roost read pins of #support
by the way you can just do :flag_code:
that too
that literally
why the hell would you use Unicode emojis
when we have Discord emojis
:youtried:
where's my nitro when i need it
thank you
If my bot has 4 shard is there a way to turn off only one?
guys can the random-puppy thing get the title of a post?
If my bot has 4 shard is there a way to turn off only one?
@jovial nexus why
They're basically splitting the load
All bots have one shard by default
Once you reach 2500 servers "splitting the load" (sharding) is required
no
its more processes (splits it across cores in default sharding iirc)
guys can the random-puppy thing get the title of a post?
@hazy sparrow no
@hazy sparrow no
@pale vessel aw man
@jovial nexus why
@earnest phoenix idk
guys how do i get a flag before a country name?
i had given the option to use flag:code
if you use the reddit api
but got now clue on how to use
Bolivia",
"Bosnia Herzegovina",
"Botswana",
"Brazil",
"Brunei",
"Bulgaria",
"Burkina",
"Burundi",
"Cambodia",
"Cameroon",
"Canada",
"Cape Verde",
"Central African Rep",
"Chad",
"Chile",
"China",
"Colombia",
"Comoros",
"Congo",
"Costa Rica",``` a weather database
https://pastebin.com/0dBtUTUL my whole code
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i am not using an api
just a packge
i have
i have read it fucking 6 times. Do i have to give a lecture about it?
@eternal osprey see: https://www.npmjs.com/package/i18n-iso-countries
that might help
https://www.npmjs.com/package/i18n-iso-countries#country-to-code is what you're looking for
then just toLower it and chuck into :flag_code:
how can i choose the shard i want to Shard.kill() ??
last time i checked gay isn't a country
- map the name of the country with its code
- use like @earnest phoenix said: :flag_[flag_code_here]: (that's a string you format)
- Easy results
i would do something like
const countries = [
":flag_us: USA",
...
];
const results = getResults(countries.map(x => x.split(": ")[1]));
const embed = new Discord.MessageEmbed();
results.map((entry, index) => embed.addField(countries[index].split(": ")[0], value));```
-but i have got a location list
like in C# and Python the strings are respectively:
Python: f":flag_{flag_code}:"
C#: String.Format(":flag_{0}:", flag_code)
US* but yes
which contain 216 countries.
my bad
String.Format is slow as fuck in c#
can't i just put in location
when your bot slows down as hell using canvas gradients for the gay command so you just save the gradient in a PNG file and combine it with the user pfp instead of creating the gradient when the command is run
just adapt it to js
String interpolation gang, then?
so it will get the whole lisst.
Awsome look at the lib i sent you
i know
I'm saying it as an example
concats all the way π
concats are taking space
.Format is the better way of making it
Or StringBuilder
if we're going for the better approach xD
Hello, i am created music bot, and i am enter -play (song ID) but in console error: "FFmpeg/avconv not found"
but yeh, in short -> that's the way it is in different languages. Just write it with the js syntax and al lgood
ah shit, I can't help about music bots. Still haven't made one 
Hello, i am created music bot, and i am enter -play (song ID) but in console error: "FFmpeg/avconv not found"
@tough moth its obvious
install ffmpeg-static
Ok

hell no
in chat