#development
1 messages · Page 161 of 1
maybe it's some failsafe against ddos
since changing the ip effectively cancels the attack
Possibly
btw
whats the catch with contab? why are they so cheap
10.29$/mo for 4cpu 8gb ram is still huge, cloud vps
compared to vultrs 40$ for same configuration
One message removed from a suspended account.
but the cost is 4x times more, there has to be some reason they are offering so low price
One message removed from a suspended account.
One message removed from a suspended account.
Iirc they don't have as much redundancy
meaning?
One message removed from a suspended account.
One message removed from a suspended account.
hmm i see, is it a good idea to host postgres on these cloud vps they provide?
One message removed from a suspended account.
One message removed from a suspended account.
thanks, mhm hopefully i wont have issues with them, always skeptical when someone offers 4x less cost 
One message removed from a suspended account.
One message removed from a suspended account.
Yeah, they have gotten better over time.
I still perfer other providers, but I dont really have anything against contabo
btw i got another docker related question, Lets see i want to deploy a nodejs app on docker, would it work if i ran npm run build locally and then only copied the build folder into docker and started the app?
instead of always copying everything and building on docker, create the build file locally and jsut copy the build dir and run the command
im surprised why nobody does that, it saves a lot of image size no?
even with nodejs, there are still some things that are platform-specific
which is exactly what docker is trying to fix
no i get that, what im asking is the project related viles
why copy package json and stuff and then run npm i and npm build instead why not just build locally
and only copy the build files
and install nodejs & os on docker as usual, and just run npm start?
considering you already have the build folder the appln should work as expected no
nvm
i answered my own question.
I would say only build locally if you want to for typescript/babel/other js parsers. For npm dependencies, no.
Plus source maps if you're using something like ts (if you just include the source code as well)
You can do achieve that with multi stage docker builds.
My project builds in the first step and then I only copy the build files into the final image.
This is with Java for clarification. Not super familiar with nodejs project builds. But I imagine it's similar enough.
The multi stage approach results in a smaller image size which is a very good outcome.
makes sense and much better approach
ty
Lol
Yes, people would want money for that
💸 me poor
-needdev
You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.
Well
No, there is no such thing as a "free developer"
yt is filled with source codes
Developer is a job that deserves to be paid
If you want free developer, then become a developer yourself
lmao
Bro is spitting fax.
Like how much day it will take to learn + apply it making Multipurpose all in one bot dc bot @deft wolf
It probably depends on how fast you learn and whether you have the ability to use, for example, a normal IDE and not writing in notepad++
Of course, paid courses are better because they teach more, but they are paid
sadly searched " Discord All In One bot Coding Tutorial
Getting no tutorial, getting download open sources
There are also text guides. Like the ones on discordjs.guide for example
You don't always need a video tutorial
Let's check Google
hlo
sup
so uh im trying to write a multi stage docker file, but the image size after it builds is 300MB, wondering if i can reduce the size further, i tried chatgpt it turned out to be absolute useless. the code it gave me increased the size to 700MB like bre.
# Adjust NODE_VERSION as desired
ARG NODE_VERSION=17.6.0
FROM node:${NODE_VERSION}-alpine as base
# Node.js app lives here
WORKDIR /app
# Set production environment
ENV NODE_ENV=production
# Throw-away build stage to reduce size of final image
FROM base as build
# To install node canvas
RUN apk add --no-cache \
git \
build-base \
g++ \
cairo-dev \
jpeg-dev \
pango-dev \
freetype-dev \
giflib-dev \
make \
python3
# Install node modules
COPY --link package-lock.json package.json ./
RUN npm ci --include=dev
# # Copy application code
COPY . .
# Build application
RUN npm run build
# Remove development dependencies
RUN npm prune --omit=dev
# Final stage for app image
FROM base
# node canvas requires these in runtime
RUN apk add --no-cache \
cairo \
jpeg \
pango \
giflib
# Copy built application
COPY --from=build /app /app
# Setup sqlite3 on a separate volume
RUN mkdir -p /data
VOLUME /data
ENV DATABASE_URL="file:///data/sqlite.db"
ENV NODE_PATH=lib/
# Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ "npm", "run", "start" ]
also is there a way i can access redis that is running on my host from docker? like i want the appln running on docker to connect to hostmachine redis, i keep getting connection refused but the status is active
You need to allow the docker to connect to your host by passing it through
There's a parameter for that
Can't be bothered to look for it rn
Also, only install what's absolutely necessary then
Because for example I can't see git being used there so
also you'll never get lower with nodes modules
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i mean it works, but it would be helpful if you know how it works, so that you can modify, update and troubleshoot bugs with the bot
thing is, you mustn't search for tutorial to making bots, you need to search how to code
besides, "all in one" is just throwing anything you can think about in a regular bot
must be fun when your code doesn't work but the one in tutorial works and you don't know why

imagine blindly copying code from videos
One message removed from a suspended account.
One message removed from a suspended account.
I do it too bro , and modify the code + fix bugs errors but they declined my bot inv
i'm sure there's a good reason for that
Me too
wait what
they declined it because you took an existing bot and added little to nothing to it
okay so, does anyone know how i can create gifs ? in node
or do i have to use something like rust
Lookup docker-compose and add redis as one of the services. The internal networking of docker will allow you to access that instance of redis. Much better than accessing the host redis instance.
gifs like these which can be sent in embeds
is it possible via canvas?
ik ik imma unsend it
but just for reference thats the only card i got
currently im using canvas to like place the cards in some order
but trying to figure out how i can add some animations
like that card
yes it is, but there are 2 things to consider
first, you must create the frames individually and then assemble into a gif, this is annoying to do without a very abstracted library cuz gif uses a bunch of metadatas
second, you have a hardcap on how detailed a gif can be:
- either 100% transparent pixels or 100% opaque, no in-betweens
- maximum of 254 + 1 colors (+1 being transparency)
- gif is BIG, so either use very small images or very short animations (remember 8 MB limit)
im okaywith the cap as long as its not too blurry and laggy
i can play around with it tho yeah
just wondering if nodejs is optimal or should i just use some other language for this
depends on what u call "optimal"
Who siad
Said*
basically faster load speed
the mod-logs message did
you cache
yeh but gotta see how fast the gif will load on the canvas with other cards
but that comes later
js is monothreaded, so u cant really split the generation into sub-tasks
first i wanna figure out how to add cool animations like that
I edited it
Removed nsfw feature
Fix emoji errors
Fix api bugs
Removed old music (tht don't work)
Added new music bot tht work better
you load the gif as a file, then extract a frame, THEN put that frame into canvas
I think ur ignoring the points I made before
what animations?
ah you edited it, i didnt see it my bad
i'd recommend that you don't put gif
my limit goal is possibly less than 100kb
since well, animated frame but the subject is not animated feels odd
that should be fine
plus with restricted frame data, you can only pack so much information per frame
have you considered using a website 
removing nsfw is the only valid modification, the fixes u made were just required because you copied the source code, not the environment (which u cant)
what packages do you recommend
if the bot had 500+ commands, u needed to add 251+ commands to be considered not a clone
i mean like i gotta display it on discord embeds, and the cards are assembled in nodejs when a user invokes command
wont happen
gif is awfully inefficient, you cant really get that small
do you know
how bad an image of that quality looks with < 100kB?????
just ONE image alone is already bigger than 100kB
lmao with proper optimisation you can get good quality
I've done it with my bot
it's ... very hard
not really
and the resolution isn't high either
"optimization" and "quality" dont exist in the same phrase when ur talking about gif
yeah i gotchu, but i just want to know how to get the same effect as that gif i shared
apng
m
could try that
so like i can load the apng onto the canvas and send it as gif in embeds right?
😭
couldn't
discord doesn't support any animation type but gif
apng if apng, gif is gif
they're image formats, u cant order a pizza and eat it like pasta
i'd recommend image only
any libs you recommend? for adding gifs into canvas
and then reserve GFX for websites instead
you basically render per-frame on canvas
clearly its possible since this bot is doing it pretty decent
for a number of frame counts:
load canvas
render
export to a frame list
compile all the frames into gif
i would assume this can be kind of a costly operation if not done right
note this
Tamanho
yea i noticed
and that's only for a few changing pixels (the rainfall thing)
true
and if you zoom in the image, you'll notice it's heavily dithered
this works fine for small sizes like the one you sent
but as you get bigger, the more dithering u get
im sticking with smaller ones yeah
well then, all you need is to generate the frames individually and then assemble into a gif file
See this image is 55kb and looks pretty decent imo, not too blurry. looks high quality
here
jpeg

yeah, thats what i meant by optimisations
no no, ur missing the point
you mean lossy compression
i got your point for gifs
it's not small because optimization, it's small because it's jpeg
aka the smallest image type to date
gif isn't jpeg
jpeg + have versions
i was just responding to her saying it wasnt possible for image to look high quality and be less than 100kb
alr
and honestly, maybe it's just my eyes after 1k+ cards, but that image is pretty low qual
i understood that part yep
yeah if you zoom in much, but to a player on discord especially mobile it looks decent
fair point
okay hold on
i just found something
wtf is this
animated webp????
webp can be animated
pngs can be animated too
okay this a pain i have to create each frame
well yes, that's how animation works
regarding animated formats, there are many much better than gif, but for some reason the internet adopted gif as the de-facto format
while it's actually one of the worst both in quality and size
One message removed from a suspended account.
One message removed from a suspended account.
I misread that. Thought you said ‘pings’
well that's how png is actually pronounced
I refuse to believe that
Ffs it actually is
like how gif is supposed to be pronounced as jif, no one really does it
me when .jif file tho
Bruh
...you know you didn't release a new version of your GitHub project in a while when the changelog takes 5 nitro messages to send on Discord 
gif. I don't open my jate or sit in my jarden

if they wanted it to be pronounced jif should have called it jif instead of trying to force an acronym
thing is, it already exists
JPEG Interchange File Format
jfif
That’s jiff
format can be omitted
jraphics interchange format
Guys with which package i can make reward vote code im using js
Make it yourself 😭
Js users try not to use a package for doing literally anything challenge (impossible)
while there is top.gg sdk, it's literally just making a common webserver with express or smth
So it must be webserver
by "webserver" I mean anything that can listen to requests
top.gg votes are nothing more than requests sent to the specified url
make sure to respond with OK or it'll keep on sending the request a few times
Nuh uh

bro is just listing buzzwords
lol
wtf is this discordjs library
i fkin didnt change anything now suddenly its broke
it says "Maximum call stack size exceeded"
It's not discordjs error
This is a error coming from the programming language itself
It seems that inside one function you call another function, and so on indefinitely
stackoverflow, literally

iirc, you can't get call stack size limit errors with async functions but I might be wrong
(do not do it anyways)
Ye I fixed it, it was a dumb bug on my end but the stack trace showed discord js lib 
Anyway, does anyone who know elixir or rust wanna collab together and make a bot? A simple bot similar to yui
you have some weird taste for making a bot in elixir
inb4, the most important thing between language performance and resource consumption is how familiar u are with the damn language
c++ being fast and efficient is worth nothing if you cant write fast and efficient code
fast js >>>> slow c++
I use c++ to write faster js
me when the stack overflows
we speaking about the same elixir?
No this one silly
at first sight, on a minified notification, that looked like an aubergine with a butt
you just have a skill issue with c++ 
elixir logo lookin kinda hawt
So that in py the bot gives me an event with the exact time it was with the time that the same discord delivers, would this code be?
entry.created_at.strftime("%Y-%m-%d %H:%M:%S")
what happens is that when delivering the information with the time that Discord delivers by default, when the message is delivered, it delivers it with another time and adds 4 more hours.
Here is an example, the information when the bot delivered it and the time that "said event" happened
and the time that appears in the discord audit log of when the event occurred
discord shows the time in your computer's current timezone
your bot runs in a server on a different timezone
I forgot that point..... thank you very much.
Reject local time zones. Embrace the number of ms elapsed since the midnight at the beginning of January 1, 1970, UTC.
Hii
The first is that you are using illegal intents and the second is some bug with the mongo db
illegal intents?
Illegal in the sense that your bot cannot access them
how can i fix it then?
If your bot is verified, you need to verify it separately for each intent. If not, you're probably trying to use an intent that you don't have enabled in discord.dev
ohk
got it
and what about mongodb?
And with mongo db, you most likely exceeded the amount of collections that are allowed in the free version
ohk thank i will create a new one then
The real question is, why do you have 500+ collections?
um i am using that for 3 years
and have made more than 500+? bots
maybe
i dont remeber
with same mongodb
You're using the same MongoDB Atlas instance for all of your bots? 
yes lol
That's really bad, you're not only clogging up the storage of the database but also bringing its performance down to its knees from all the bots reading and writing to it
I've never seen someone do that before
Also maybe consider using PostgreSQL or similar
It seems to me that they are not all working at once, he only creates each collection with the creation of a new bot
yeah
I doubt he's capable of hosting 100+ bots since he's using the free version of mongo db 
Each bot is still making requests to the same instance though 
nopeee
i just test botss
lol
I am pretty sure the error is telling you exactly what's wrong
TypeError: channel.isTextBased is not a function
at InteractionCreateAction.handle (/home/runner/lavamusic-replit/node_modules/discord.js/src/client/actions/InteractionCreate.js:50:33)
at Object.module.exports [as INTERACTION_CREATE] (/home/runner/lavamusic-replit/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/runner/lavamusic-replit/node_modules/discord.js/src/client/websocket/WebSocketManager.js:352:31)
at WebSocketShard.onPacket (/home/runner/lavamusic-replit/node_modules/discord.js/src/client/websocket/WebSocketShard.js:489:22)
at WebSocketShard.onMessage (/home/runner/lavamusic-replit/node_modules/discord.js/src/client/websocket/WebSocketShard.js:328:10)
at callListener (/home/runner/lavamusic-replit/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/home/runner/lavamusic-replit/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:527:28)
at Receiver.receiverOnMessage (/home/runner/lavamusic-replit/node_modules/ws/lib/websocket.js:1178:20)
at Receiver.emit (node:events:527:28)
What version of discord.js are you using?
i updated it to v12.5.3
but now i m getting a error
An error has occurred : TypeError [CLIENT_INVALID_OPTION]: The Amount of shards option must be a number.
before updating i wasent getting this error
cuz im getting error in v14
What errors
Are you trying to set an embed colour as something like BLUE or RED
oh
You can also import the Colors object and use one of the pre-defined colors
https://old.discordjs.dev/#/docs/discord.js/main/typedef/Colors
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
replit 
also mfw lavamusic-replit is a clone
how do i know if a bot is approved on top.gg?
(I will do it through the bot)
Can i control it with @top-gg/sdk module?
arent there any way to change the value red to #FF0000 in every file fast and easily?
Simply search for .setColor('RED') in every file and replace it with .setColor(0xff0000)
damn
Your editor should provide a search/replace functionality, if not, use other tools
replit bruh
💀
how can you not tell already
TypeError [ColorConvert]: Unable to convert color to a number.
at resolveColor (/home/runner/lavamusic-replit/node_modules/discord.js/src/util/Util.js:289:63)
at EmbedBuilder.setColor (/home/runner/lavamusic-replit/node_modules/discord.js/src/structures/EmbedBuilder.js:23:36)
at Object.run (/home/runner/lavamusic-replit/src/events/Client/interactionCreate.js:56:40)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ColorConvert'
}
💀 same
Your first mistake is using Replit here, have fun searching for and replacing all of that manually
i do
it have an option
replace all
but same error after changing .setColor('RED') to .setColor(0xff0000)
What version of discordjs are you using
It’s .setColor('Red')
yes
Just like that
no
so?
im saying if you want do it like RED they changed it to Red
sry but i dint understand
do i have to change it to red?
again
All the colors are here
should i use hex or int?
The setColor() method doesn't accept strings in v14
damnn
it does?
then what to do?
lul
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
hex
k
include the # ofc
I was using .setColor('Red') and it was working just fine
not working still....
Might've been a version that didn't completely remove string support, the source code doesn't support strings at all now for that method
what can i do now?
idk
Let me try something
You need to do .setColor(0xff0000), make sure all of them uses that (can also use a different hex of course), and make sure your changes are saved
k wait lemme check
nope
@earnest phoenix still works and its on v14.13.0
do i have to update anything like modules?
no
k
That's very strange, the source code doesn't allow it in any way, they even have assertions for this (check the predicate)
https://github.com/discordjs/discord.js/blob/b2ec86576/packages/builders/src/messages/embed/Embed.ts#L171-L183
Then you're not saving your changes, or haven't replaced all of them, can you show the error you're getting right now?
Hm?
k
[AntiCrash] | [UnhandledRejection_Logs] | [start] : ===============
TypeError [ColorConvert]: Unable to convert color to a number.
at resolveColor (/home/runner/lavamusic-replit/node_modules/discord.js/src/util/Util.js:289:63)
at EmbedBuilder.setColor (/home/runner/lavamusic-replit/node_modules/discord.js/src/structures/EmbedBuilder.js:23:36)
at Object.execute (/home/runner/lavamusic-replit/src/commands/Information/help.js:18:6)
at Object.run (/home/runner/lavamusic-replit/src/events/Client/messageCreate.js:122:21)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ColorConvert'
Strings are not allowed in the setColor() method in any possible way there, not sure how it works for you
my friend has my pc let me dm him and to run the testy bot
What do you have in line 18 of the commands/Information/help.js file?
wait
Screenshot the code
.setColor(client.embedA)
What have you setclient.embedAto?
idk
It should be in your index file
It's your bot, right? You set it
@sonic lotus change client.embeda to 'Red' and try that
nah same issue
Find what you set client.embedA to in your bot's source code
oh damn it workd there was a issue with help.js code
thanks @earnest phoenix and @warm surge
hi
You’re welcome
Is it normal for me to send a test webhook on the top gg dashboard and receive 3 or more notifications?
no
yes if you do not return a HTTP 200 response fast enough
hi guys, does anyone know how I can get a Spotify artists streams ❓
and track streams and album streams
and monthly listeners
i don't see in api but i see other services have them so i wonder how they get it
The api would be Spotify them selves. I think I read a while back jt was https://developer.spotify.com
I may be wrong thi
no i looked
it doesn’t have plyxoubts or nothing
or monthly listeners
Getting an actual Spotify audio stream is not happening unfortunately. Their API is private and I heard hella expensive as well.
Why most music bots do stuff like sound cloud or anything else really. I have a music bot that's only for my server for YouTube music since I don't plan on releasing it to the public anyways.
i don't want that
i want
playcount of tracks
I see
but spotify api don't provide
but i see services with them
so how they getting them
Are the services you see like discord bots or proper websites?
A website that collects and analyzes music data from around the world. All of the charts, sales and streams, constantly updated.
could be scraped data
I think its scraped information
Most definitely, spotify doesn't really have an api that gives that kind of information
is scraping spotify allowed
They probably dont like it, but nothing states it's really "Allowed" or not unless its in their TOS.
hm
Who reads company tos anyway
would it be unethical to scrape them
right now i'm scraping this website but it sucks
i wanna get the information myself
fun fact
open.spotify.com uses React
which meanssss the data they use on the site is in the code :3
application/ld+json section

i would just parse the description part imo
The OG meta tags provides more info than the JSON. Spotify used to include the ENTIRE JSON, until they changed it to what it is now
ah ok, noted
how can i access network with puppeteer?
Wdym access network?
like with spotify website
Open a page you mean then
i can get playcount for track from the request they make to this api
so hhow can i access it
there is
I meant there's no api for that specifically
Did you read puppeteer quick start tutorial?
look at this
Doesn't mean there's a public api
That's not how it works
Scrapping only gives you access to the data ON the page, not requests made to/from it
So like, if there's a number somewhere in the page, you can get it, but not the request that filled that number
It's...complicated to explain, but when u enable network trace in chrome you're intercepting all requests made and received, but that data doesn't exist anywhere on the page
It only exists on chrome itself
Because you were intercepting the requests
Doing that with pptr is quite a bit complex, if possible
🙁
Pptr is for scrapping pages, not intercepting requests
so i can't get playcounts of songs? they're no displayed on page on spotify website
Is the play count written anywhere on the page?
not on the spotify website for some reason
but they are on the desktop app
but can you scrape the desktop app?
Not through legal means
Are u sure it's not listed on the site? Iirc spotify uses react
So both their site and app are the same code
Try reading the source html to see if there's a playcount element invisible
The data they want is likely not available
but they don't give any numbers
Wdym numbers?
i wouldn't use puppeteer
you could easily use the web api
just use something like axios and then cheerio to parse it
left is desktop app
or this
i don't get this
This solves your follow count issue
what is a hash
look here
sha256Hash?
yeah
ngl you're giving me battleless vibes
my computer keeps copy and pasting blank images
i can't copy and paste text
you gotta paste again
i need to reset my computer to fix
until it shows the preview properly
no it doesn't work
nah
how do i fix then
cope with it
this does not work
The field at path '/albumUnion' was declared as a non null type, but the code involved in retrieving data has wrongly returned a null value. The graphql specification requires that the parent field be set to null, or if that is non nullable that it bubble up null to its parent and so on. The non-nullable type is 'AlbumResponse' within parent type 'Query'
-b 1069001636061663324 mute evasion from battleless
dondathedon#0 was successfully banned.
good job

he's unmuted
yeah I realized afterwards
poor blud
anyways do you know why this issue is occuring with your code
idk what that means
Can I access my discord account token from top.gg site
As im logged in there
(Experiment)
LMAO
very funny
well yes it is, if you knew who he was
peacefull is battleless
the username made it kinda obvious too ☠️
can i share my code? which I want to connect to the top.gg api webhook section
State your full issue, and wait for someone who can help
people cant help with only parts of the issue you're having
I've corrected everything with my code but the bot still can't connect to the webhook api
that doesnt help
- what issue are you facing
- what have you done already
- what did you try to fix it already
- how does your code look like
Literally describe the issue you're having
what you're telling does not help at all
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yes
One message removed from a suspended account.
no
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Hii
hi how are you welcome to development 🪷
But i don't have development role
One message removed from a suspended account.
Ok
What is going on hee
Here*
you don't need bot developer role to chat here
it's for everyone 🌸
Ok
not much right now
Ok
@earnest phoenix if owr bot get verified we get any dm
top.gg or discord verified?
top
Ok i am waiting
For 2 day
good luck
it can take a little bit sometimes
I now
question guys is it possible for these to be like
moderation ban
moderation edit message
?
Why not just /ban?
yeah
doesn't work tho
this is my json
[
{
"name": "help",
"description": "Get help with the bot."
},
{
"name": "moderation",
"description": "Manages the moderation commands.",
"type": 2,
"options": [
{
"name": "ban",
"description": "Ban a user.",
"type": 1
},
{
"name": "message",
"description": "Manages the message commands.",
"type": 2,
"options": [
{
"name": "edit",
"description": "Edit the message for warnings, kicks and bans.",
"type": 1
},
{
"name": "remove",
"description": "Remove the message for warnings, kicks and bans.",
"type": 1
}
]
}
]
},
{
"name": "server",
"description": "Manages the server commands.",
"type": 2,
"options": [
{
"name": "info",
"description": "Gets the servers information.",
"type": 1
}
]
}
]
error
DiscordAPIError[50035]: Invalid Form Body
options[APPLICATION_COMMAND_CONTEXT_MENU_OPTIONS_INVALID]: Context menu commands cannot have options description[APPLICATION_COMMAND_CONTEXT_MENU_DESCRIPTION_INVALID]: Context menu commands cannot have description
it is slash command
Then how error says "context menu"?
bro I went back to read this guy's messages and peacefull is batleless it can't be otherwise 💀
He admitted he is
But he deleted the message
He even got a ban but the mute on the main account is over
Yeah it's battleless
so why is he still here 😭 ban evasion
Oh I thought it was permanent
?
not sure why you mean
i wasn’t banned from here
well i was falsely
because a mod decided to ban me without checking anything
lol you can tell that’s how much he hated me
no check if my mute was over
just ban
😭
anyways guys i fixed an issue with my code but i still don’t think this is possible
i tried it and the first one wasn’t registered
afaik a command can either be a command or a list of subcommands, it cant be both
so if you set it to have subcommands, you cant run it by itself
sad
Spot welding
You dont need goggles for soldering
Cooking
have a development meme i did not steal
What is number? How can I put my hexadecimal color using EmbedData?
Number is quite literally a number
parseInt('hex code color', 16)
That is the type
Does files have to be uploaded to discord cdn before they can be shown as this? or a link will do fine?
They need to be uploaded
So max 8mb right?...
25mb
0xff0000 for #ff0000
If the server is boosted then it's more
It does I think
Nevermind yeah, according to docs:
A file upload size limit applies to all files in a request (rather than each individual file). While the limit depends on the Boost Tier of a guild, it is 25 MiB by default.
So ye 25MiB, unless boost is higher
can you get a servers info from an invite url?
I don't think so
yea for sure
https://discord.com/api/v10/invites/dbl for instance
my bot are been declined because : The prefix you've listed on your bot page seems to not match your bot's actual prefix.
However, in my discord server, it's this prefix / that I mentioned
You need to contact the person who checked your bot
In a private message
thx
I never worked with the module "Express" I do not know what to add in 'app.listen(80)' that number I have to change or I leave it so for the use of webhook?
That's the port
u can
but u cant use 80 if u have ssl enabled, nor the other way around
I mean, u can, but the other side will refuse to connect
hmmmm
this could be a problem
https://github.com/actions/checkout/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
if you use actions/checkout@v3 in your github actions, its failing rn, they seem to have pushed a corrupt tarball
Noticed that too
how would i do it with discord.js
or should i just make the api request myself
Client.fetchInvite() https://old.discordjs.dev/#/docs/discord.js/main/class/Client?scrollTo=fetchInvite
ok
thx
sir
or ma'am
Are you using global slahs commands? Or guild specific? Because if you use guild specific the bot reviewers cant test the commands
global slahs commands
then talk to the person who reviewed your bot
I’m doing it now
Hi I'm building a web site with Svelte and express and I wonder if it's better to put my session with express and do an API call with Svelte in the SSR (+server.svelte) to get the session data or to directly import my session from my backend to my SSR (svelte)
One message removed from a suspended account.
One message removed from a suspended account.
what
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
What url
I mean just index the guild object
for those values
not hard
brother making a discord api wrapper in c# 💀
One message removed from a suspended account.
One message removed from a suspended account.
c#
this is why typed languages are nice for modeling firm data
makes it easy to serialize and deserialize
like the icon url
for the invite
i assume that string has something to do with it?
how can i convert it to the url
You can't just generate an invite with a guild object alone
That would be a massive privacy issue
then what’s that code for?
The "icon" code?
That's the hash for the server icon
so how can i get the server icon from that?
from their CDN
thx
You can't generate an invite without your bot being in the actual server and having proper permissions though
if you do not put a file type it will default to the applicable one
so if its animated, it will render the gif
its ok users will provide the invite
i just wanted to get icon url from invite
btw guys in discord.js how can i get full command used
from interaction
What do you mean by full command
like
Like the options?
ok so
i do
ok
so
i do interaction.commandName
for example
but if i have a command like "moderation ban"
it will only return "moderation"
but i want all
"moderation ban"
That will get the subcommand group /a b c it will get b
but if you only have /a b it will get b (for subcommand)
Uh interaction.commandName + interaction.options.getSubcommand(true)
I mean that's the best you'll get
Not sure why you need all
oh this actually does work
nvm thanks for help guys
subcommands are considered options on normal commands
it sucks but it's how it is
you have to map it out the way that works for you
I do this for example
very basic functionality but is very simple to implement
too hard
i am trying 💔
why
Because you will never succeed in what you want to do if you just quit early. 🙂
The programming isn't necessarily the hard part (once you've experienced a bit of it), it's designing creative solutions to your problems
i'm not quitting
pov:
Basically what Waffle said. I'm defenitly not anything special when it comes to being a developer, I only know the basics of javascript and node. But the more I play with it the more I learn and stuff. I started doing this stuff from Discord bots, but I do branch out of it from time to time aswell. Now my bot is pretty large in terms of code. Is it good code? Probably not lol
^ and im still taking classes (it’s requirement for highschool)
yeah i'm quitting that
Wish coding was a requirement when I went into HS lol
but i'm not quitting being a coder🤓
I have my fair share of dogshit code in my compiler that I need to clean up ngl, reminds me
i asked my administration and it’s only for me it’s required because they know about it because they saw my school browser’s history
Typescript?
rust
Ah rust
dear god I would never make a compiler in ts
I should have figured since you said compiler
❓
That should be something you check in the code for JS not sql
🙁
The cleanness of this code makes me want to learn rust
this is absolutely not very clean
i don't wanna do that
it looks clean to me so
could be 10 million times better ngl
can you do it in sql?
yes waffle
I would imagine so
but even bad rust looks clean
Looks fine to me


would thhis work
'UPDATE fractions SET owners = ? NOT "undefined", message = ? NOT "undefined", WHERE invite = ? NOT "undefined"'
however I have some clean code too
❓
Watch from timestamp 
https://youtu.be/TGfQu0bQTKc?t=507
Rust programming language
Interview with a Rust developer with Jester Hartman - aired on © The Rust.
Find more Rust opinions under:
Full version on paah.vhx.tv
Programmer humor
Rust humor
Programming jokes
Programming memes
Rust
yew
Rust memes
Rust jokes
unsafe command
future
traits
#programming
#jokes
#Rust
Just reading the first line I'm just like... function build mutable? vector? expression? Result
It's just so much simplier to just check for those being undefined b4 doing a database update in all honesty. Probably faster but what do I know
my types are a lil annoying to read I admit
😛
//UPDATE fractions SET owners = ? NOT "undefined", message = ? NOT "undefined", WHERE invite = ? NOT "undefined
if(!owners || !message || !invite) return
what’s this
basically checking if they exsist and if any is undefined dont do anything
is this sql
javascript...?
the full function type (expanded from TypedAST) would read like this technically:```rs
pub fn build(&mut self, ast: Vec<Stmt<Expr>>) -> Result<Vec<Stmt<Typed<Expr>>>, TypeError> {
...
}
🤷♀️ im a league game now so idk my man
silence
What
what’s confusing sir
How do I configure top.gg bot to only send messages to a specific channel?
can you explain further
I don't think I can be much more clear.
what messages?
I installed the bot on my server. It sent a message to one of my channels. I want it to send messages to a different channel.
what bot?
iirc the top.gg bot doesn’t have any features that would send messages
unless that’s changed in the 2 months i’ve been gone
Well, it sent a message.
can you send a screenshot?
Of what?
the message?
I'll wait for a response there.
anyways does anyone know how i can do this
you mean this?
what do you want it to do if the values are undefined?
if the value is undefined i don't want it to update
well
first of all undefined does not exist in sql, so depending on the library you're using, it will either convert it to null, or not work
so assuming it converts it to null
Bro just fucking explain your problem 😩
afaik sql does not treat null values as non-passed values
so if you set something to null, it will be set to null
there is no fallback
now
you CAN do comparisons in sql
i literally did above
you can use something like insertion triggers
which are functions that you define, and are executed on every insert
undefined doesn't exist in sql
😭
so the final answer is: its possible yes, but dont bother, just do it with js
i hve something like that in one of my projects
i simply build an sql string with only the columns that have actual values to update
pretty sure you can
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yeah that was me
i decided to retract my message because i no longer wish converse here
Could u code a bot in c#?
So....html?
html is not a programming language
I know but it has access to the internet and http lol
Nop
Html has access to nothing, it's a purely structural language, no executing logic whatsoever
However u could technically code a bot in sql, more specifically plpgsql
Intresting
@lyric mountain were you the one who had a mailcow setup too?
🥰
i don't know about you, but i don't usually spend my days standing in front of banks and smile at them





