#development
1 messages Β· Page 1229 of 1
idk about the other ones
i heard of skysilk.com
contabo is Β£3
they said $2 0-0
they'll be at that price almost
probably
brb gnna steal my dads cc cuz mine not working for somme reason HEHE
aka beg him for it
lol
good deal?
or shouldi get 8gb?
tbh imma still use heroku
it works for me
the vps thing only helps with file storage
but i use mongo
heroku is mostly fine for APIs and other lightweight services
it just isn't for bots
is there something wrong with this?
because im getting an error
and i dont understand what im doing wrong in the above screen shot
is it possible to hack a discord bot through the github if the github is connected to a webhook connected into the main support server?
(don't worry, i'm just asking)
Hmmmm
invite is undefined
Uuu auger green name, congrats
but shouldnt the try catch define invite as null?
@near veldt if the webhook URL is visible when you access the webhook page then yes (if someone with admin perms on the repo has malicious intent) other than that no
That isn't defining it I don't think lol
Null IS undefined iirc
but anyways its a webhook
oh
worse they can do is send some nasty messages or everyone mention
you can always revoke it
as soon as i added my webhook on my public github, my bot got hacked and spam dmed everyone
you probably did something else
my token wasn't visible
webhooks cannot dm anyone
webhooks aren't even linked to bots
no config either
good deal?
@sharp thicket I get that except with unlimited bandwidth for $6 a month
Oh wait that has unlimited bandwidth
how do i have settings take a variable so instead of settings.prefix for example i can do settings . (variable key)
Does anybody else use repl.it to host their bots and has their bot up 24/7
If so, do you use runkit for it?
What can I eval in djs to make the bot react to a specific message?
Like react to a message with a certain word or phrase?
no, usually i would do settings.prefix i want to replace prefix with any variable
Bracket notation looks like this: obj["somekey"]. It's the equivalent of obj.somekey
Like react to a message with a certain word or phrase?
@opaque hawk no, a certain message with the id
ooh thank you
Like it can't dynamically look at the name of the variable (not the value) and use that, but a string should be good enough.
Hi
@opaque hawk no, a certain message with the id
@fallow steppe Afaik, since every message has a unique ID, as with everything else in Discord, so the only way that you could really have the bot react to the message is it being like a verification/announcement message that wont move out of sight for a while, or userbot your bot, which is against ToS
I dont think you got it
elaborate
I want to eval something that makes my bot react with "β€οΈ" in a message I specify
So you have the message link for the message you want to react to? I, personally, haven't dabbled with reactions, but the djs guidebook will have everything reactions
it's just a single PUT request to /:channelid/:messageid/reactions
I have the id of that message
all you need is the channel id and the message id
my message ID is this: 753407058375868417
Yes
yes you also need the channel id, or the channel object
That
so that this full message ID would be something like 272764566411149314/753407232716177438
a message id is a message id, a channel id is a channel id
So when I eval my bot to say something in a channel it's client.channels.cache.get("id").send("Hi")
I want to know what to eval so it reacts to a message I specify with id with a heart
Id rather use an eval command or hook it up with a command, like so: message.channel.send("message");
Ok
keep in mind that fetch is a promise
I like an eval command, The code is simple (excuse the TypeScript): ```ts
import { Message } from "discord.js";
import { inspect } from "util";
export const name = "eval";
export const usage = "eval <expression>";
export const description =
"Evaluates a JavaScript expressions and returns the result";
export const permissions = "developer";
export const dev = true;
export async function execute(message: Message, args: string[]) {
const client = message.client;
try {
const result = await eval(message.content.slice(process.env.PREFIX!.length + 4));
message.channel.send("TRIPLE_BACKTICjs\n" + inspect(result) + "\nTRIPLE_BACKTIC");
} catch (e) {
message.channel.send("TRIPLE_BACKTIC" + e + "TRIPLE_BACKTIC");
}
}```
uhh
except replace the TRIPLE_BACKTICs with three backtics
So in my case, I could go "r!eval 1 + 1" and it would return the following: js 2
.then(messages => (message.author.id=="570646739145457685"&&message.content.startsWith("test"))?messages.size:console.log("null"))
.catch(console.error)
what is wrong with this?
you tell me
then why is something wrong with it
I dont know. Well, ok, the syntax is fine then
ok
that is a typo, It didnt work with messages
sry for that
when I write it down here 
meh, I should have choosen a different variable
π¦ I am eval it in the testing-1 and yeah, doesnt work π€·ββοΈ well anyway
Considering getting into redis, but I have one question before doing so
Is data stored in redis persistent across restarts?
no
it stores the stuff in the cache
I figured so, alright thanks

i still dont get the point of using redis
sure, inter process data sharing
however
grpc and named pipes exist
so like??
idk man
@earnest phoenix IS THAT
i dont want to say anything wrong by accident and look stupid lol
i only know a little about redis anyways so
rEaLlY aDvAnCeD PyThOn dIcTiOnArIeS is how I see it @earnest phoenix
the ternary operation returned null for all of the fetched messages
What
Urban command
What is urban command
the cmd that search for definition
Oh urban dictionary
Ye
@clever vector well
I'd imagine NSFW is picture only, but I'm going to defer to someone else for this
Lock it to nsfw channel only
can anyone help me fix this please
Anything that search stuff from internet, should filter nsfw
Better safe than sorry
Can't new up a RichEmbed
@leaden shoal MessageEmbed in v.12
urm
@leaden shoal show me what did you define discord as
V11 or V12
12
@earnest phoenix I kinda solved it, but I kinda feel like it could be done more simpler π w/o pushing the content into a list
sorry but for script wich program you use?
@tidal smelt ?
@midnight blaze i am new and my question is : which program you use to script ?
cane someone help, im tryna make a covid command, but im getting an error saying cannot read property utils of undefined, here is my code: https://srcb.in/4e2810aef2
thanks
don't copypaste code @chilly mason
can anyone help me with sub folder command handling please been stuck for a day lol
urm I couldn't figure out what you said do you think you can explain once more please as I just woke up so I wont be brain dead like last time
bet thanks β€οΈ
how can i make a on_message command which then updates a mongo db database async?
tryna make a covid command
just returnMath.floor(Math.random())
how can i make a on_message command which then updates a mongo db database async?
@drifting wedge So on_message event you want to upserts a mongodb entity?
@drifting wedge So on_message event you want to upserts a mongodb entity?
@faint prism yep!
just return
Math.floor(Math.random())
@faint prism lol
this sub folder command handling shit is going to kill me
how can i load cogs from a folder?
@drifting wedge this what you mean?
https://stackoverflow.com/questions/5364928/node-js-require-all-files-in-a-folder
can somone please like add onto my code or send me like a direct guide or something please on how to make a sub folder command handler please Ive been stuck for a day
my code:
const fs = require('fs');
client.commands = new Discord.Collection();
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);
}
no
I just sent a link @leaden shoal above your question I think
ohhh yes thanks Ive done it thanks
they want to loop through all folders in a folder
that's not what that does
and this is the third time im telling them to at least start and attempt to do it (which they haven't)
I have never worked with command handling shit as I have never made a big bot
oh, you'll need recursion for that probably
you haven't even attempted to do it yourself
and you don't know how to do it because you copypasted the snippet you currently have from somebody else
I have
@leaden shoal What was your attempt?
Oh hey, Cry.
Did you see what I posted yday about the .NET Foundation?
your code doesn't have to work perfectly on each run
you run it, see what doesn't work, fix it
nope, what is it?
oh it's sick, 1 sec
nope, what is it?
@earnest phoenix https://youtu.be/2gjMrZ9XbRQ?t=14m12s
mhm
oh wow
-bots
that's really cool, proud :p
Pretty lucky find tbh. I only found it by googling a random referral link in my website stats that looked unusual
are you inverting the colors somewhere
no
its not even inverted
its just fucked up
i think it has to do wit hthe color
with the background 1 sec
Hey how do I make it so when I do a command the command I did auto deletes please
call delete on your message object
-bots
hi huys, I tried to use .env file store token but errors shows discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized and discord.errors.LoginFailure: Improper token has been passed.
.env file: DISCORD_TOKEN = xxxxxxxxxxxxxxxxxxxxxx
@trim saddle someone want u help
how can i center text in a box:
uhh
@pseudo wolf use a json or an ini file compared to the environment
it's safer and it parses properly
no prob
does anyone know how this could be the case? out of nowhere, my bot begins receiving a ridiculous amount of data and then somehow also starts sending a ridiculous ton of data. this leads to my bot getting ratelimited like immediately
i am logging and monitoring the command usage and there are no abnormal commands being run, and there arent any self bots spamming commands either. i have a lot of cooldowns in place to prevent command spam so i dont think its an issue with people spamming commands. pretty much everything looks completely normal from a usage standpoint; nobody is entering any suspicious commands or anything like that
this amount of bytes being received and sent is insane (went from sending 10k bytes/5 min to literally 3 million/5 min). does anyone have a hunch as to why this may be?
.env file: DISCORD_TOKEN = xxxxxxxxxxxxxxxxxxxxxx
@pseudo wolf try removing spaces between the = and token the env file saves the space too
how do i check if a person has sent more than 1 message in the span of x seconds?
@obtuse saffron I tried to, doest work and i tried to add "" doesnt work as well
@pseudo wolf oh
const clowns = new Set()
if(command == 'clown') { //w!clown command
clowns.add("313481150637277197")
clowns.add("224363077318082561")
if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply('cant use this L')
if(message.mentions.everyone || message.mentions.roles.size) {return message.reply('Improper mention.')}
let person = message.mentions.users.first()
if(person.bot) {return message.reply('You cannot clown bots.')}
let newClown = message.mentions.users.first()
if(!newClown) return message.reply('You need to mention the user you want to clown.')
if(clowns.has(newClown.id)) {
clowns.delete(newClown.id)
message.reply('removed clown :(')
} else {
clowns.add(newClown.id)
message.reply('new clown in town!')
}
}
client.on('message', function(message) {
if(clowns.has(message.author.id)) {
message.react('π€‘')
}}
)})
``` everything works here except removing a clown. I'm not sure why, can anyone help?
This code originally all worked, but I changed it so I don't have to use a listener for every command now, and it stopped working
hi
case 'daily':
if (talkedRecently.has(message.author.id)) {
message.reply("You can only collect your daily reward tomorrow");
} else {bot.commands.get('daily').execute(message, args);
talkedRecently.add(message.author.id);
setTimeout(() => {
talkedRecently.delete(message.author.id);
}, 86400000);
}
break;
so in here i use this as a cooldown
is there any way i can restrict it to only the server
cuz the cooldown applies everywhere like even if he didnt collect the daily reward in another server
If you want to make it simple, add to the talkedRecently set/collection/whatever the guild ID and the user ID. That way, you can restrict it to a guild by user.
For example: js talkedRecently.add(`${guildID}-${userID}`); // ... if (talkedRecently.has(`${guildID}-${userID}`)) { // do stuff }
is there any way i can restrict it to only the server
@vale garden by changing the way you store the cooldown
use discord.js collections not arrays
then follow what Lite said to store both the guild id and user id
sets are fine
explain pls
const taggedMember = message.mentions.members.first()
message.channel.send(`${taggedMember.id}`) // this works fine but
message.channel.send(`${taggedMember.username}`) // this doesesnt work
taggedMember is a member object
you need to go the user property of that member object to see username, tag etc
taggedMember.user.username
but how do i view how much time is left before removing it from the map?
like You can't claim your daily yet! you have to wait x how do i view x?
Do you mean you want to see how much time (in ms) is left
store user id with the time that the cooldown will expire
Because the timeout should still be started like starwoman said
For example
Do you mean you want to see how much time (in ms) is left
@sudden geyser yup
"28367282" : time24hourfromnow
And you can check if the time passed that
If passed or equal then cooldown ended
Store when the user hit the ratelimit. To get the time since, minus the current date in ms by the time the user hit the rate limit.
And delete the user from data
wait will the cooldown reset if my bot stopped/gets a error for a sec?
Yes
Unless you store it in db
Which is not recommended
Unless its daily weekly command
yup im trying to make a daily command
Daily/weekly should be stored in db
with quick.db (for now)
Other than that just json data
anybody who can tell me how to implement these π
badges?
yes
What library are you using // what are you doing specifically
discord.js in userinfo command i want to list the badges if possible
You can use <User>.fetchFlags() which returns a promise resolving to an instance of UserFlags.
You can't see all badges the user has (for example, nitro).
What's the rate limit on updating guild channels again?
it isn't static
refer to response headers
Which language
use isFinite
how? will it be like ```js
if (args[[0] == isFinite) {
// code
}
else {
// code
}
how to make it not work for negative numbers
you could just use args[0] > 0, as js will implicitly convert args[0] to a number in that check
remove isFinite
oki, thanks again
!IsNaN
?
so is it ```js
if(isFinite(args[0] > 0)) {
// code
}
no i want to pass a string through the function
Talking to bow pro#8897
o
Okay so ```js
const prefix = "bow".toLowerCase();
doesesnt work
Is this a good organization? Just asking people's
Why mobile No????
mobile is not recommended for coding
Could move module.exports to the bottom of the file
@hazy sparrow Ik mobile not recommended but am on phone rn and not my PC, so Continue code.
@slender thistle Thanks for the tip but am leave them there
if not mobile then thats a really good way to organize but it takes more space
Just my preference but you could just use // get X module as comments instead of all that padding
^yes keep the evidence before he deletes everything 
Ty qt marco
lol
@hidden cedar Welcome
mobile 
like if message was a string
@worthy glacier typescript
the best way is typescript
Just pass a string through the function... if you want to be able to pass only strings, check if the parameter is a string with typeof param === "string", if it returns true, then it's a string, otherwise, you can throw an error or just do nothing
if (command == 'say'){
var channel = args[0].toString()
console.log(channel)
var text = args.slice(1).join(" ")
console.log(text)
let channelID = client.channels.cache.find(channel => channel.name.toLowerCase() === channel);
console.log(channelID)
if (channelID) channelID.send(text);
}
channelID returned undefined
ok?
just do
message.channel.send(text)
lets say i have a command that can take about 1.5 seconds to complete before it returns a response (a rank card). would you consider this long enough to have some kind of indicator that its working, and what would you use?
im thinking just a simple text only message 'Please wait...' thats deleted once it uploads the rank card
but im also on the fence, that 1.5 seconds isnt even long enough to need it
that 1.5 seconds includes lag and time taken to upload the image
from when i issue the command
i timed mee6's rank cards and they take 2.7 seconds, on average, but mee6 has a lot more servers to process requests for.
(it doesnt have any kind of progress indicator or 'im working' notice)
For something like that you could use the typing indicator
hmm, great idea
that could be a bad idea as it could create infinite typing scenarios if it restarts
i would consider a please wait message
if the bot restarts while it's generating the card
but you dont turn typing indiactors off manually
they auto turn off after 30 secs?
hm
typing indicator works great, thanks @nimble kiln π
Nice π
hmm, actually, just realised it doesnt even matter if the bot restarts
rank cards are genered by my REST API with the API server itself sending the discord calls
so if the bot requests the tb-api make a rank card, it'll generally complete even if the bot crashes or restarts while waiting for it
theyre auto cancelled after 30 secs it seems, i read that somewhere, or on delivery of the next message
oh ok, then it shouldnt matter anyway π
i got a
my bot is split into two parts, a backend http api and a frontend C++ bot, generally the frontend bot just passes commands to the backend api, so restarting the frontend would still complete the request
nvm
the only thing that could break it is if the FPM dies
which would break the entire bot anyway
(and dashboard lol)
ok π
uh
<meata name="viewport" content="width=device-width, intial scale=1"/>```
i used this
but my website not getting mobile responsive
meta, not meata
@carmine summit ```js
if (command == 'say'){
var channel = args[0].toString()
console.log(channel)
var text = args.slice(1).join(" ")
console.log(text)
let channelID = client.channels.cache.find(channel => channel.name.toLowerCase() === channel);
console.log(channelID)
if (channelID) channelID.send(text);
}
There are countless problems here
channelhas already been defined so you're literally passing the variable inclient.channels.cache.find();instead of a callback function parameter
Rename the first parameter inside client.channels.cache.find(); to smth like ch
also var -> let
var channel = args[0].toString();is a really terrible way to check if a channel is mentioned
Explicit variables gang
var channel = args[0].toString();is a really terrible way to check if a channel is mentioned
You dunno ifargs[0].toString();will always be a channel mention
Message.mentions.channels returns a Collection
You can do .first() on the collection to get the first mentioned channel (which will probably be the channel which the guy wants to send the message to)
args[0].toString();bruhString.split();does not return an array inside an array soargs[0]will probably be a string.
client.channels.cache.find(channel => channel.name.toLowerCase() === channel)what the fuck are you even trying to do here
@carmine summit PLEASE learn programming before trying to make a bot.
I'm confused why didn't your text editor point out all this shit
Grind with this app like shit then try to make a bot https://grasshopper.app
idling here anyone needs help (with JavaScript only) ping me
don't even bother pinging me if you use https://giveawaybot.party for REQUIREMENT giveaways
How to install heroku module
i have a question
How to install heroku module
@plucky mist
i have a question
@drifting wedge ask it
it takes a while to talk to mongo db, like its a couple seconds
if my prefix is mongo db customisable
then will it take a couple secs to respond??
yes
db communication shouldnt take that long though
if it does, you're doing something wrong
yeah
unless you're using mongodb atlas with a fucking terrible wifi connection
How to install heroku module
message.channel.fetch(gid).then(newwinner => {
const winner = newwinner.reactions.cache.get("π").users.cache.filter((b) => !b.bot).random();
TypeError: Cannot read property 'cache' of undefined```
huh?
discord.js version ?
is heroku git good?
11 12 ??
does it allow me to send mroe than 75 kbs?
12
@plucky mist are you trying to install discord.js on Heroku?
@stable eagle try doing console.log(JSON.stringify(newwinner))
to check what type newwinner is
message.channel.fetch(gid) what's gid
pretty sure TextChannel.fetch() is not a function
hits up docs
it is, returns a channel not a message tho
Channel.messages.fetch
ok
@stable eagle you'll need to do message.channel.messages.fetch(gid)
Is there any guide for making a web dashboard for the bot ?
Is there any guide for making a web dashboard for the bot ?
@obtuse saffron maybe
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
K.
there is no guide
in order to build a fully secure dashboard you need to be well met with full stack development
https://github.com/kamranahmedse/developer-roadmap this can help you a ton
specifically focus on frontend and backend
Ohk
@quartz kindle how do I make it so instead of saying Cannot GET /path/to/invalid/file expressjs will do ServerResponse.sendFile("./404.html");?
basically it will send a 404.html file
Put it in a * route
uhh what?
This what you are looking for?
https://expressjs.com/en/guide/routing.html
app.on("*", (request, response) => {
response.sendFile(__dirname + "website/404.html");
});
lemme test it
is on message blocking?
is on message blocking?
@drifting wedge uhh what?
what about app.post can you return 404 errors in POST requests
You can
Any request can be responded with a 404, no?
Error: ENOENT: no such file or directory, stat '/home/runner/codeco-discord-botwebsite/404.html'
now it's just me passing the wrong path to the 404.html file
did you forget the "."?
code
im disappointed
lol
Guys i want to cretae a cooldown for my hourly command but how
Database
Create*
Thats how
Guys i want to cretae a cooldown for my hourly command but how
@hazy sparrow my way is that i make an array upon startup and just push and pop user IDS from it
done
Database
@quartz kindle fuck no
databases are permanent
- get a map
- check if the user id who ran the command is in the map, if yes, return
- add the user id of the user who ran the command to the map
- set a timeout, which will delete the user id of the original runner from the map once expired
dont switch 2 and 3
else it will break
@earnest phoenix how do i get like how much time is remaining before it will remove it from the map?
Like you cant claim your hourly yet, you have to wait x
setTimeout(()=>{
// remove user from map
},delayInMs)
Person uses command
Store timestamp in db
Person uses command again, check if exisys in db, if it does check how long ago the timestamp is from, if its too soon, dont run, else run and update the timestamp

figure some stuff out on your own
code it was one little snippet of js
with literally no function
Tim i know the process but i have no idea how to code it i just know the map part but not the time remaining part
You know how to store and get data right?
Yup
And yoi know how to check if data exists right?
So store the timestamp when the person used the command: Date.now()
Then when the person uses it again, get the stored timestamp and compare it with the current one
Date.now() - storedTimestamp
how do i add miliseconds to it?
= time passed since
code it was one little snippet of js
@earnest phoenix no it's that bow pro almost NEVER tries to do anything on his own
Like date.now() + 5000 = date.now() + 5 seconds
lemme type the whole messy way i do cooldowns
Yes, but you dont need to add time to it
So lemme type out hiw the whole thing will be and tell me if im wrong
Wait hold on
quik.db can store dates?
@earnest phoenix no it's that bow pro almost NEVER tries to do anything on his own
@earnest phoenix i made a hourly command wihout the actual hourly and they can use it without the hourly cooldown
dates always have their unix timestamp anyways
you can store that
// start of the bot-code.js
var cooldowns = {
nameOfCommand: [] // initialized on startup so people don't get stuck in infinite cooldowns
}
// when the command happens
case "nameofcommand":
if (cooldowns // original object
.nameOfCommand // returns an array
.includes( // Array.includes()
Message.author.id // Message is a discord.js class
)) {return Message.reply("You're on cooldown man!");}
else if (!cooldowns.nameOfCommand.includes(Message.author.id)) {
// do the command shit
// finally put the user's ID in the array
cooldowns.nameOfCommand.push(Message.author.id); // pushes the user id to the Array
// remove the cooldown after X milliseconds
setTimeout(() => {
let index = cooldowns.nameOfCommand.indexOf(Message.author.id);
cooldowns.nameOfCommand.splice(index, 1);
});
}
thats a nice template
@hazy sparrow i just typed a hell big blocck of code
now please learn to do some stuff on your own
thats enough
wdym
Can quick.db store dates
yeah
Ok great
dates always have their unix timestamp anyways
@earnest phoenix
it literally stores data
that's it
and DON'T use databases for storing cooldowns
Wot
bot goes offline => the cooldown has not been reset in your database => bot comes back online => user is forever stuck on cooldown
while by using arrays inside the code if your bot goes down the whole cooldown array is removed from RAM
.save(timestampOrDateObject)
on(message, {
getDb(message.author.id)
if (date.now >= timestampIndb)
{
runCommand()
}
})
Databases are required for long cooldowns, like hourly or daily commands
You dont need a db for a short cooldown like 5 seconds
in case of downtime, short term cooldowns are going to expire anyways by the time you boot back up, so losing the data isn't a big deal
you can use a Collection or a Map
@slender thistle @quartz kindle he still doesn't know how databases shit work so he'll probably mess up
that's why i recommended arrays
wait
But he wants an hourly cooldown, he needs a db
terrible idea
*cooldowns object with arrays for every command
quick.db takes more space to store stuff than normally storing stuff in RAM
your ram will go really high
your bot restarts = no more cooldown
@thick gull that's perfectly fine bruh
Not for hourly commabds
not for like hourly or daily commands
k
some bots restart hourly afaik
caching in Redis is a good option or a NoSQL database
i don't even have a daily or hourly command so 
itβs just better to store it somewhere
short term cooldowns are fine with just being stored in memory
long term cooldowns are to be stored in a database

how can we see where was a uncaught expressio caught in node
like where it occured
uhhh
plz help because it said me node --trace-uncaught but it just says this
Error classes have some methods to check shit
How to check the Shit
Show the full error
Can we Quote a text in a embed if yes then how?
use the unhandledRejection event in process
Cannot send messages to this user?
should give the full stack trace
Cannot send messages to this user?
maybe his dms are closed
But my bot restarts due to it
I just wanna stop it from restarting
Add a catch to your dm commands
I do
try{
}catch(err){
bot.channels.cache.find('id').then(channel =>{
channel.send(`Could not dm a person because`)
})
}```
oh
Oh
ok
so
Try catch only works if you await it
It says await only available in async
even tho all the event is in async
Did you remove the
Then?
no (coz i am dumb)
Remove it
I just never read the word stuff
just because of the invisible bar
so i thought it was off-topic
i thought u said does having invisible fuck with PILLOW?
lol
The exp bar is transparent?
And what is the issue
Im not understanding what the issue is
the color is inverted
can anyone help me with this please π¬
https://discordapp.com/channels/264445053596991498/272764566411149314/753444389929353251
and this is the base
basicly the bottom 2 are the base
the second one is it with the invisible bar
and it gives that wierd one
and the last one is it, with a normal bar
So if you use the one with a transparent part, the colors get fucked up?
yea
are you using canvacord's assets in PIL?
wdym
never mind then
i got the bar from a yt vid
that was canvacord
but i didnt get any code form it
yeah
just the rank card
yes but you're using it in PIL right?
PILLOW
a fork sure
PIL is like 10 yrs old
that's genius
?
Are you using any kind of conversion in your code?
no
Try converting it to rgba
nothing else?
But you said your issue is the image, not the text
yes
i didnt know eval whas build in but now i do
so the text should be fine?

Try fixing the image first
ok
Deal with the text later
@drifting wedge thats literaly trying to convert the text "rankcard12.png" lol
sorry just woke up, im trying to ask if its possible that the voting webhook runs into an issue at some point that leads to it spamming the webhook with invalid votes or something
not really

@delicate shore #general-int
there were recently some issues with the webhooks, not sure if that's what it was
one of my friends told me my bot can get temp-banned from webhook spam and the only one i use is top.gg's
how would that even happen lol
the communication is directly between you and top.gg
there's no discord involved
@delicate shore #general-int
@earnest phoenix
Tbh I can go to #general instead of general 2
yes but upon receiving the vote my bot dms the user
one of my friends told me my bot can get temp-banned from webhook spam and the only one i use is top.gg's
@near ether
Your friend is probably stupid then
That wont happen
My bot also DMS a user
On receiving vote
lmfao gotcha ill let him know
K 
@drifting wedge thats not even pillow, its just basic programming lol
@drifting wedge thats not even pillow, its just basic programming lol
@quartz kindle ummmm
"String"."String" makes no sense
awkward chuckle
Unless youre using php
You want to convert the image
Which means, you import it first
And then convert the result
Therefore
.open().convert()
(CRON) INFO (Skipping @reboot jobs -- not system startup)
any idea?
and yes i already make the .sh executable
I am getting an error when importing :
from cogs.utils.checks import embed_perms, cmd_prefix_len, hastebin
is anything wrong with it?
python
What's the error
unresolved reference
ive worked with it before
and the other red lines say unresolved reference
any idea?
do i need to pip install it?
everything works execpt the actual give and i dont have any errors;
const db = require("quick.db");
module.exports = {
name: '8ball',
description: "Ask the 8ball anything you want!",
execute(message){
const prefix = "bow"
if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
const taggedMember = message.mentions.members.first()
const bal = new db.table(`${message.author.id}mybal`)
if (!args.length) {
return message.channel.send("Next time also tag a person and how much to give. Eg: `bow give @person 100.`");
}
if(args.length) {
if(taggedMember){
if(args[1] > 0) {
if(!args[1] > db.get(`${message.author.id}mybal`)) {
db.subtract(`${message.author.id}mybal`, args[1])
db.add(`${taggedMember.id}mybal`, args[1])
message.channel.send(`Gave ${taggedMember} **${args[1]}** bowbucks`)
}
if(args[1] > db.get(`${message.author.id}mybal`)) {
message.channel.send("Don't fool me. You don't have that much to give!")
}
}
if(!args[1] > 0) {
message.channel.send("Next time enter a valid number above 0.")
}
}
if(!taggedMember) {
message.channel.send("Next time @mention the person who you want to give bowbucks to.")
}
}
}
}
no
dont use pastebin
lmao
hatebin?
(all forks of hastebin π (except hatebin))
π
Hello ,Can you explain to me how to install translate smoogle ?
what
@hazy sparrow try:
if (args[1] < 0)
instead of:
if (!args[0] > 0)
ehm
or if (!args[0]) will just work lol
yea i thought both were same
no they aren't.
they do the same thing
can i have like half cogs?
like a cog thing, but that acts like a main file thing?
@hazy sparrow nope, !variable checks for every nullable value, while variable < 0 just checks if the value of the variable is less than zero.
not the length.
you can just remove the line if (!args > 0)
@fickle sapphire what
no if he doesn't want undefined behaviour
look some lines above
it already says: if( args > 0)
so if its not the command wont execute
what
i want something else to be execute if that doesesnt execute?
let something = null;
if (!something) console.log("true");
something = "";
if (!something) console.log("true");
something = false;
if (!something) console.log("true");
something = 0;
if (!something) console.log("true");
something = "0";
if (!something) console.log("true");
// every case should return true.```
and it is needed
if (args[1]) and if (!args[1]) are not the same
const db = require("quick.db");
module.exports = {
name: '8ball',
description: "Ask the 8ball anything you want!",
execute(message){
const prefix = "bow"
if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
const taggedMember = message.mentions.members.first()
const bal = new db.table(`${message.author.id}mybal`)
if (!args.length) {
return message.channel.send("Next time also tag a person and how much to give. Eg: `bow give @person 100.`");
}
if(args.length) {
if(taggedMember){
if(args[1] > 0) {
if(!args[1] > db.get(`${message.author.id}mybal`)) {
db.subtract(`${message.author.id}mybal`, args[1])
db.add(`${taggedMember.id}mybal`, args[1])
message.channel.send(`Gave ${taggedMember} **${args[1]}** bowbucks`)
}
if(args[1] > db.get(`${message.author.id}mybal`)) {
message.channel.send("Don't fool me. You don't have that much to give!")
}
} else {
message.channel.send("Next time enter a valid number above 0.")
}
} else {
message.channel.send("Next time @mention the person who you want to give bowbucks to.")
}
}
}
@hazy sparrow
Test this
okay hold on

You first detect if something is there and then again detecting if something isn't its easier to use else
This is how that works:
if (something){
//code
} else {
//code
}
that's so many unnecessary database calls
^^
but isnt
if(thing){
}
if(second thing) {
}
also the same?
no
you should learn the language you're working with
hell, this isn't even language basics
it's logic gates
the basic of basic
if(something) {
} else if (something else) {
} else if (something else) {
}
Did you test what I sent?
oscar your code gives a Sytnaxerror: Unexpected end of input
stop copypasting it
Which line?
stop copypasting code
???
https://www.w3schools.com/js/js_if_else.asp π
read this
(and do the exercises thx)
what does nullable mean in javascreept
take a guess
???
@hazy sparrow you literally copy pasted his EXAMPLE TEMPLATE
the example on its own does not work
Which line?
@fickle sapphire ok apparently i had missed a } at the end while copying it and now its online but same thing is happening
i jsut copypasted what he sent
the ONLY PLACE from which you should ever copy paste code is https://discordjs.guide because they ONLY give examples and you'll never be spoonfed
no
i jsut copypasted what he sent
@hazy sparrow we told you not to
dont copypaste ever
yeah but
k lemme ctrl z
Guys
wut
https://w3schools.com/js will teach u js
Can we talk here about C# etc not about discord bots?
Can we talk here about C# etc not about discord bots?
@strong fractal Hell yeah
read the channel desc
Guys
@strong fractal i'm an apple so i don't count as a guy
so yeah
What's up
Guys
Can we talk here about C# etc not about discord bots?
@strong fractal as long as your topic is related to pogger programming it is allowed
I have a question
I am new to visual studio
I have a question
@strong fractal -asktoask
And c#
Out with it, man
just ask the question
lmao
My cursor selects a letter
so
Not a space between them
BRUH
How I change it?
MOMENT
l0l

Bruh
how do you select a space
Not even C# related?
@hazy sparrow idk lmao
how do you select a space
@hazy sparrow you select it like normal text?
I said that I am new
For example
@strong fractal you have bot developer role and you're saying you're new that can only mean you use BotGhost
also why do you need to select just the space

time to do another one of my idling sessions
takes deep breath
idling here need help with javascript ping me
You're on discord, why did you take a picture of it instead of a screenshot
I canβt select space between letters
@strong fractal there is no fucking space you dumbass
there is no space there
@strong fractal there is no fucking space you dumbass
@earnest phoenix please don't attack beginners π¦

@faint prism he is just a kid
auto-correct on Grammarly extension is drunk
@earnest phoenix your Apple is drunk
I said I am new
@strong fractal you new to typing or something?
@earnest phoenix are you toxic?
@strong fractal can confirm was toxic
https://discordapp.com/channels/264445053596991498/265156286406983680/753622212983914687 lol
@faint prism he is just a kid
@strong fractal
does he seem to care @earnest phoenix
Lmaooo
you pressed insert and went into insert mode which is used in unix systems
@earnest phoenix wait insert button has a use
PLEASE DONT BLOCK MEEE ;(
oh snap, insert. Yeah, that's it
I will give you anything
Money health
Your own galaxy
Pls ;(((
Donβt block meeee
epic sarcasm
PLEASE DONT BLOCK MEEE ;(
@strong fractal then don't act like we're gods and we don't have the right to say the f word and we're kids
That isn't #development
How do I select between letters
read my message
also
yuck wpf
w hite
p oop
f uck
i get what you mean now
Finally :D
How do I select between letters
@strong fractal there is no space bruh
Is it possible?
just click on the dead center of it
why are you ignoring what i said
Is it possible?
@strong fractal only if there is abetween the letters
how can i later images with pillow?
@drifting wedge your pillow is a computer program
or @strong fractal clikc the letter to the right of it and click the left arrow key
@drifting wedge your pillow is a computer program
@earnest phoenix pillow as in pil
again, why are you ignoring what i said
and read mine too
you're literally in INSERT mode
yeah
What is insert mode?
press the [Insert] key on your keyboard
Bruh
click the button again not gonna help you said i'm a kid
you don't have to tell us
i am so dump
XD
Thx guys
Btw
I still donβt understand
Why it doesnβt affect like visual studio code, browsers? This insert mode
Consider an intro to computers class, maybe at a public library.
That should explain the behavior
It only affects my visual studio
@strong fractal now you're actually coming off as a cringe post
that's a dumb question
@strong fractal you can for example if you want to click on the center of bp just click on p and press the left arrow key
the same answer why the same key doesn't unlock all doors
different implementation
@earnest phoenix well visual studio code and visual studio are kinda same
@earnest phoenix stop aaaa
Well they are not
Consider an intro to computers class, maybe at a public library.
@faint prism libraries are terrible for programmers they tell us to stay shut and we sob like we're dying when linux sudo just doesn't want to work
They have different outcomings
how can i layer images in PILLOW?
vsc and vs are two completely different software despite their naming
But still people write scripts in them
@faint prism libraries are terrible for programmers they tell us to stay shut and we sob like we're dying when linux sudo just doesn't want to work
@earnest phoenix No I mean like learn how to send emails, use a keyboard, browse the web, manage files, etc




