#development
1 messages · Page 1810 of 1
i tried like 20 ports
all same error
i tried 3000, 5000, 9000, 2000
how do i see what ports are in use @royal portal
you are opening the same port twice
thats why it errors
how
ok
im using a vps
is it cuz of that?
no
ok
here is my code
nothing is wrong with it
@quartz kindle
idk why it no work
thats not your full code
No cry lil burger
am cant do it 
god my code is messy 
First time?
So when using kurasuta sharding manager, how would I create the shard and direct it to the main file?
module.exports = {
name: 'stop',
description: 'Stop command.',
execute(message, args, client, ymdhm){
client.channels.cache.get('863932226714599464').send('🔴 Bot offline. `' + ymdhm + '`');
console.log('Bot offline. ' + ymdhm + '');
process.exit();
}
}
I'm not getting any errors but the message to the channel is not sending
client.channels.cache.get('863932226714599464').send('🔴 Bot offline. ' + ymdhm + '');
this is not working
process.exit(); this used to be client.destroy and it would send a bunch of errors but now it doesn't
Try awaiting that send method. Your bot could be restarting before it even get to send the message
the console.log('Bot offline. ' + ymdhm + ''); works though
Because that's blocking
Simply make your function async async execute() and add the await keyword to your send method(await client.channels.cache.get(...).send(...))
I'm not sure if adding a status-changing command (without a cooldown) is a good idea. You're likely to get ratelimited, afaik the limit is 5 status changes per 20 seconds
client.user.setActivity('text-here', {
type: 'WATCHING (or whatever)'
})
yea
what
well if u want a custom prefix u should probably watch a video on how to amke one, theres a lot out there
ok
const act = message.content.slice("?change-status".length)
well i just gave u it
well u gotta watch a lot of videos then
mos tpoeple on discord wont be willing to teach u
just to help if u have issues
uh
this will give u the status
if u say that, itll get rid of ?change-status
and itll set your status to that
if u do
client.user.setActivity(act, {
type: 'WATCHING'
})
thats really all u have to do
also i recommend making it so only u can change the status, otehrwise ur bot will be rate limited
uh
u dont need to set an interval
i mean u can
if u want
module.exports = async bot => {
const act = message.content.slice("$change-status ".length)
console.log(`${bot.user.username} is available now!`)
setInterval(() => bot.user.setActivity(act, { type: "WATCHING"}),5000)
};
u can change the type to whatever u want
PLAYING, WATCHING, LISTENING, STREAMING
it doesnt matter, it just gets the length of it
@earnest phoenix i just edited it
Just a little tip, if you implement “listening to” or “ watching” into your sentence the activity looks a lot better
So smthn like “Listening to Upcoming’s coolness! | ?help”
Not possible sadly,
No problem!
Does if else do much faster than switch-case for Javascript? On like 20 expression/statements
I'm more comfortable with if else, though the code look ugly with if else chain
use switch for better readability / easier to edit for future if you have 20 cases
If anyone is proficient at FFMPEG args, I need some help implementing filters into a rewrite of LavaLink I'm working on. I've already implemented some filters
you can view my project here:
https://github.com/AmandaDiscord/Volcano/blob/main/src/worker.ts#L317
LavaLink's filter definitions can be found here:
https://github.com/freyacodes/Lavalink/blob/dev/IMPLEMENTATION.md#using-filters
let m = channel.messages.cache.get(args[0]) || await channel.messages.fetch(args[0])
how do i catch this while assigning the var
@errant flax put a .catch after fetch()
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
const client = new Client({
partials: ["CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION"],
intents: Intents.ALL,
allowedMentions: {
parse: ["users", "roles"],
repliedUser: true
}
});```
I am trin out `npm i discord.js@dev`
You can remove that cache.get() one. fetch() uses cache under the hood and only fetches when needed
oh 
Intent.All shortcut have been removed, so is Intent.Flag.privilleged/non privillage.
Intents.all is removed from v13 to prevent users from needing intents that they dont need
What is allowedMentions?
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Me: checks why is there no output
Code: return in promise but no resolve

Does anyone know your issue to be able to help you
The problem was fixed without me doing anything.
But I got this error several times there was typing
ERROR no such file or directory, open index.js but i dont have a file named as index .js
And i couldnt stop project
what's the value of "main" in your package.json ?
const client = new discord.Client({ disableMentions: "" }); this would disable pings on every server correct even if the bot had that permission or am i wrong about this
sorry not that but that settings
that doesn't make any sense
anyway did you select bash or nodejs when creating the repl ?
How can u use quick.db in a hosting???
Did you put the " in your .replit file?
It created auto
So yes
But i typed without them bc i am lazy

@left rain which hosting service are you using?
which operating system did you install?
wdym?
or is it one of those pterodactyl panels
windows Linux macos what are you using
throw e;
^
Error: /home/container/node_modules/better-sqlite3/build/Release/better_sqlite3.node: invalid ELF header
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at bindings (/home/container/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/home/container/node_modules/better-sqlite3/lib/database.js:9:24)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)```
windows
its pterodactyl
lol
windows needs more stuff for quick.db/sqlite to run
pterodactyl is not a real vps
you need to install sqlite in there
how???
not copy paste the node modules
not trying to be an idiot but how do u get guild id from message.
umm
message.guild.id ?
oh i was forgetting id like an idiot
Hello
anyone here
Who can help me and tell where to put a bots token in python?
what the fuck did someone start selling pterodactyl discord bot hosting?
Which is the best code?
Util.removeMentions(args[0]) if a bot just removed the ping but still does the at everyone is that bad should i just delete message completley or is it fine
if(true == true){ return true }

Hm
How to make own website?
learn html and css
pm2 is kinda good for temp hosting i guess
i used pm2 for my bot on vps
How do you make a Bot with multiple Languages, Do you save the Lang-Data in a JSON File?
pretty much
uff
yes, this will explode your require cache xD
I would prefer an ini file and parser
As the format of an ini file is already perfect for this use case
?
This account is old, very old
lol, I didnt changed my tag too
makes semse
i have an account from 2016 with 6698
its disabled now i gotta verify it with phone number at some point
i sold an account from 2015 for 80 bucks
lol
should've sold it for a higher price
👀 
breaking tos moment
hahaha that was a jokje


as if anyone would actually read that trash or care about it 

there's actually people who have nothing better to do but report messages lol

wannabe discord mods
I generally hate people too much to do something like that
But randomly banning accounts for no reason sounds funny tho
ping xig, they will forward it 
i report like if someone says tehre under the tos age
thats all tho
yeah that's reasonable
thats not even like a i dont want kids on here type thing its just because the amoutn of weird people on here probably best they arent on here
exactly
Error fix? and yes this is an open source from Spiderjockey02
`/home/runner/Discord-Bot-1/src/utils/EgglordEmbed.js:14
const language = this.guild?.settings.Language ?? this.bot.config.defaultSettings.Language;
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/runner/Discord-Bot-1/src/utils/index.js:2:9)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)`
You have an old node.js version
yes
yes
yes
ah yes
I asked how to make why you telling yes yes yes
Looking into HTML coding...
Or if you want to go through the easy route, like me, buy Adobe XD, and then get the web export plugin
Hmm
@rigid jetty just find a flipping html generator lmao
Oo
i wonder if web design curriculums are going to change with a preference for SPAs
since pretty much no one uses vanilla html/js/css nowadays
I do or still do and I don't see any reason to change that
heck it is possible to serve a webpage with 0 html on Firefox
You need a website. Why not do it yourself? With Wix, you can create your own professional website. Choose from hundreds of templates. Whether you're a small business owner or an artist, we've got something for you. Just drag and drop to create your site exactly the way you want it. It's easy! Change your text. Choose one of our backgrounds or upload your own, and easily add one of our beautiful galleries. You can even set up an online store in seconds. With just a few clicks, you can connect your site to your favorite social media channels, and add popular Web apps and services, like Google Maps, Contact Forms, and so much more. Just like that, you've got your own stunning website, that is fully optimized for every device. Create your stunning website today. It's easy & free!
stunning
Those templates are all overloaded, horribly slowly and just for people who don't know how to build your site from 0.
it's essential knowing how to work with vanilla but there should be more time spent educating on SPAs, because, well, realistically any solid company you go in is going to use either vue, angular or react
A lot of small companies use wix
i once saw a microsoft page that uses facebook's react
I will never go with anything JS based.
based
SPAs are the future 
yeah ms encourages the usage of react
wat
i forgot which app on windows 10 uses react native
Even if they are my sites are still working, in any browser and mobile device
Cortana :^)

Doesn't microsoft teams use electron w. react
Cortana is scary
I read somewhere that it's electron
well
just proves my point
SPAs are the future, almost everything is a web app now
discord, spotify, vscode
Well then I'm the last traditional website not being an app I guess, if so
don't get me wrong there's a ton of other ways you can go, i.e. qt with wasm and shit like that
but SPA tech is in demand right now
yew 😩
VoiceStateUpdate this event sometimes returns undefined and sometimes it doesn't work at all. What could be the reason?
Based on my logs of clients I still prefer to support even very old browsers (clients)
you can use webpack / typescript / babel to support pretty much any mainstream browser
Or simply rely on strict HTML 2 and CSS2
Doesn't mean I'm not using CSS3, too for fancy animations shit etc. (as people need that today), but if your browser doesn't support it, the website remains 100% functional
as well as the JS framework
Even with JS disabled the functionality still remains 100%
you shouldn't need to continue support for old browsers though
old browsers are insecure and not up to today's standard
allowing them to access your site just encourages that behaviour
i straight up don't serve my app to IE users
doesn't matter if you create web panels for communities with people being ignorant enough not to update to a new browser or simply being too dumb to do so
You can tell em to use a modern browser
Anyways... there's no advantage or need for me at least to switch over to a different tech
That doesn't mean my sites are ugly or unresponsive... PHP as backend tech is more than fast enough
And I'm not really a good frontend creator anyways to make fancy and modern looking pages
Do I understand it correct that I only have to insert my top.gg token and it should work? I just started programming and am kinda stuck.
Writing WASM manually I heard is a good idea

cooldown.cooldowns.find((val) => val.id.toLowerCase() === "daily").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "beg").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "gamble").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "work").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "rob").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "passive").timeout = 0;
cooldown.cooldowns.find((val) => val.id.toLowerCase() === "transfer").timeout = 0;
Any faster way to do this?
what are you doing in the first place
That is uh
Getting all objects with the ids of daily, beg, gamble, etc... and get their property of timeout and make it equal to 0.
Yeah
is cooldowns a map?
Can't you a for loop this
No. An array.
I tried.. doesn't seem to fit in.
.. I'm also having a slight issue whereas sometimes cooldown.cooldowns.find((val) => val.id.toLowerCase() === "daily") may return undefined if it doesn't find it. (Not sure how to handle that).
const toBeErased = ["daily", "beg", ...rest];
for (const cooldown of cooldowns) {
if (toBeErased.contains(cooldown.id)) cooldown.timeout = 0;
}
or
for (const cooldown of cooldowns) {
if (cooldown.id === "daily" || cooldown === "beg" || ...rest) cooldown.timeout = 0;
}
but that can get cumbersome
.. ^
Is there a way to skip it if it doesn't find it?
The code I gave you fixes that as well
Ah I see..
I'll use this, but last thing.
i also hope that you're checking for the user
otherwise you'll be setting everyone's cooldown to 0
I know. :)
I believe it's working.. fixing some errors here and there, and it's complete, thanks.
did you read the error
yes
and you don't know why you're getting it because you copypasted code 
i dunno where is the code of err
it tells you
read the stacktrace
if you scroll a bit down there should be a list of functions called and the locations
o
(node:14520) UnhandledPromiseRejectionWarning: TypeError: fields.flat is not a function at Function.normalizeFields (/bot/node_modules/discord.js/src/structures/MessageEmbed.js:450:8) at MessageEmbed.setup (/bot/node_modules/discord.js/src/structures/MessageEmbed.js:78:91) at new MessageEmbed (/bot/node_modules/discord.js/src/structures/MessageEmbed.js:18:10) at embedLikes.map.e (/bot/node_modules/discord.js/src/structures/APIMessage.js:166:40) at Array.map (<anonymous>) at APIMessage.resolveData (/bot/node_modules/discord.js/src/structures/APIMessage.js:166:31) at TextChannel.send (/bot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62) at Object.exec (/bot/src/commands/help.js:18:21) at Object.exec (/bot/src/listeners/message.js:15:31) at MusicClient.on.args (/bot/src/structures/MusicClient.js:61:58)
Your node version is probably outdated
root@somethingcp-6816://bot# sudo apt-get install -y nodejs Reading package lists... Done Building dependency tree Reading state information... Done nodejs is already the newest version (10.19.0~dfsg-3ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded. root@somethingcp-6816://bot# node -v v10.19.0
lol
when i try to install latest it's just v10.19.0
Try harder
so this? curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt-get install -y nodejs
i guess
root@somethingcp-6816://bot# node -v v10.19.0
😢
uninstall the old version of node
apt remove nodejs
if it still doesn't work retry what you sent above
suresure
@vivid fulcrum
finally
root@somethingcp-6816://bot# node -v v14.17.2
thanks
Can someone help me
The file doesn't exist
I dont need this file bc
/home/runner/tyrn-bot/index.js
And i didnt defined this file
Then the file isn't imported into repl.it
You shouldn't use free hosting in the first place
Does somebody force you to rent an expensive VM? Pick a cheap provider (even from a different country).
No its about exchange rate and economic problems 
pay with paypal then
lol... how would that change the exchange rate
Grab an old android phone and use termux
Bad solution but works for small bots
I get this error sometimes
Not always
It fixes in a few hours by me doing anything
0|shard | MongooseError: Operation `giveaways.find()` buffering timed out after 10000ms
Has anyone got this error when using mongoose?
On Css, can a outline have a radius? so it can be rounded like a border?
did you connected it to MongoDB?
could you show how?
iirc you can fake it with box-shadow
@tired panther show what?
okay thx
How you are connecting to MongoDB
const mongoose = require ('mongoose')
mongoose.connect('mongo url', options)```
the options pls
and did you connected before you did the Operation?
mongoose.connect(config.mongo, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
useCreateIndex: true
})```
like this
could you await the Operation, maybe this makes a Difference
await mongoose.connect ...?
nope it did not make a difference
yes and then do the Operation...
`client.build();
^
TypeError: client.build is not a function
at Object.<anonymous> (/bot/index.js:4:8)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
`
could you check if the Ip is whitelisted on MongoDB?
hi
Think
mongoose.connect(config.mongo, {
useNewUrlParser: true,
useUnifiedTopology: true,
useFindAndModify: false,
useCreateIndex: true
}).then(e => console.log(e)).catch(e => console.log(e))
I was talking with @earnest phoenix
you have to define the Function on your Client
👀
What is the ip address for hosts?
Whats the best for font-size: em, px or vw ?
i got same error many times today,do you use mongodb atlas?
Best is to disable all costum devices scales and stick to 100% as the local browser/device scale is always the best
em
and box sizes in em too?
not really, em is relative to the font-size of the parent element afaik
You should use flexbox or a grid for dynamic box sizes
Or if you want a box to always be a certain size, then use px
thx
Yes
okay maybe there server had issues
I think so too
const fs = require("fs");
const keep_alive = require('./keep_alive.js')
const { Collection, Client } = require("discord.js");
const client = new Discord.Client() // Your discord.js or eris client (or djs ShardingManager)
const { AutoPoster } = require('topgg-autoposter')
const client = new Client();
const ap = AutoPoster('Your Top.gg Token', client)
client.commands = new Collection();//Making client.commands as a Discord.js Collection
client.queue = new Map()
require('discord-buttons')(client)```
is this right
Are you having an issue?
Show the error
const fs = require("fs");
const keep_alive = require('./keep_alive.js')
const { Collection, Client } = require("discord.js");
const client = new Discord.Client() // Your discord.js or eris client (or djs ShardingManager)
const { AutoPoster } = require('topgg-autoposter')
const client = new Client();
const ap = AutoPoster('Your Top.gg Token', client)
client.commands = new Collection();//Making client.commands as a Discord.js Collection
client.queue = new Map()
require('discord-buttons')(client)
client.config = {
prefix: process.env.PREFIX
}
//top.gg consol
ap.on('posted', () => {
console.log('Posted stats to Top.gg!')
})```
I assume you do fill in your top.gg token right?
can you just tell is this right codes
i need try in vsc codes for my bot i need restart my vps
so can you tell is this codes right
I'm not sure if it will work. You have to make sure all the files you require exist, all the required packages are installed and you have to fill in the right top.gg token.
om i try
wait
is this auto matic show in top.gg
@spare badger one dual const found
so want cn i do
Remove the first const client = ... line
wait
how do i post custom server count to top.gg since the count my bot sends ia a couple off
and i cant figure it out
is it a couple off because it recently joined new servers?
nah
its always been like that
i jsut never really did anything about it
but i wanna try and fix it
its 2 off, shouldnt really matter.
but if you feel it needs to be corrected, whats your code look like?
const ap = AutoPoster(`${config.topgg}`, client)
ap.on('posted', () => {
console.log(`Top.gg Server Count Posted **(Server Count> ${client.guilds.cache.size + 2})**`);
})
its just that atm
hmm
you can use the top.gg/sdk
i looked
autoposter uses the sdk
i cant figure it out thats why i asked
well i looked at the docs also
and cant figure out hot to post like "custom" server count
Documentation for @top-gg/sdk
thats the doc i looked at
im guessing its mroe confusing then i thought
const api = new Topgg.Api('Your top.gg token');
await api.postStats({
serverCount: client.guilds.cache.size,
shardCount: 1
})
this should work
just that or do i keep
ap.on('posted', () => {
console.log(`Top.gg Server Count Posted **(Server Count> ${client.guilds.cache.size + 2})**`);
})
should i delete that part?
This does a post request on a Interval, postStats posts the Current Data, but when the Interval is runned again, the data will be overwritten
I mean ofc you want the data to be overwritten if it changes
If it doesn't you aren't overwriting anything
You are just sending the same number.
are you requiring the correct lib?
const api = AutoPoster(`${config.topgg}`, client)
api.postStats({
serverCount: client.guilds.cache.size + 2,
shardCount: 1
})
ow ai
im dumb
i just
relooked
@solemn latch @tired panther Thank you for the help 
Why are you doing + 2 btw
Fake numbers!!!!!
the stats are minus two on the listing
because the count is off
so i am guessing trying to correct
Ah
Why does it minus 2
so i just + 2
that is weird
no idea
its always a little behind because of cache
Ah I see
Is it consistently -2 ?
i do it with my status also
when you log your cached guilds size is it minus 2?
honestly, might just be the invite link page being incorrect, not top.gg or your bot.
yea
like
everything is -2
but invite page
it was only
-1 for a bit but then like last week it became -2
yeah that sounds like the invite link page being wrong
your actual count is whats being logged by the cache.
well on my other bot its 100% fine
invite page and everything else is in sync
so you thik its just issue on discords side then?
also i use djs-light if that changes anything
it makes no sense for you to not have access to two guilds from your bot.
yo, anyone know a good way to use aliases for keys in a JSON?
does your json use dynamic data? if yes use a proper Database
if no Why not use a Proper Database?
lol
reading a local file is much faster, and I don't have a ton of data I need to save so a db is like using a grenade to kill a fly.
The issue is still that that option doesn't scale well. If you shard, multiple processes cannot read/write at the same time. Your needs will most likely change down the line and JSON is not viable to scale.
Just because you don't have a lot of data doesn't mean you can't fuck up and corrupt the JSON.
Well, this is for a private bot, so I only have to worry about 1 server's use.
imagine having a gigabyte-sized json db and a single misplaced commas fcking everything up
oh, and json in plain text files are very little compressed
most dbs compress the data to allow much more information in a very little footprint
plain text doesn't
well I've been told that if I'm only storing small amounts of data, JSON is the way to go. I have a db for my other bot that holds a lot more info and I think the JSON works better for the mentioned function.
json is merely a data exchange format
it's the way to go when you want to communicate with external sources
it's not really meant to be used for actual storage
unless we're talking about fixed data (as in, never or very rarely modified)
hm. I wonder why I was told that then. It was from a reputable programmer too..
who told you that
it's primarily fixed data. Admins can edit it, but it's an uncommon occurrence.
any reputable programmer would abominate json dbs
no runtime modification?
like, does the software modify the data stored in it?
or is it manual modification?
it can by a command, but it doesn't happen often at all.
it's been needed once in the past month.
per-user?
no
global?
yeah
why don't u use a properties format then?
property_1=bla bla bla
property_2=bla bla bla
property_3=bla bla bla
property_4=bla bla bla
property_5=bla bla bla
property_6=bla bla bla
property_7=bla bla bla
I guess I'm not familiar with properties.
it's more lenient for syntax errors and won't kill your whole file for a single misplaced char
there are libs that make it really easy to read it, and you could also make your own parser which is no more than a line reader
basically, a properties file is composed by key-value pairs (like json), with each row representing a new property
I'll have to read into it. I don't understand your concern about a misplaced character though.
for example:
{"id": 123, "name": "blablabla", "whatever": "anyway"}
is valid
{"id": 123, "name": "blablabla", "whatever": "anyway\"}
is not
the latter, when read will return [Object object]
hm
if you save it BAM, file is dead
happened a shitton of times around here, many dudes asking why their guild config files were all [Object object]
xd
the funny thing is that no matter how hard you try, without constant backups your data is lost forever since you've ovewritten the data (making it unrecoverable by software)
your example didn't kill the file..
wait
wrong slash
we try again
nope, it didn't kill it
but it added a second \
in that case it wont mess up because js won't even let you run
you need to do that on a separate file
then try to read the file from js and convert to json
it'll fail and return object object
or if you want a better testing experiment, add an extra " somewhere
How can i create a command, in which if a user sends any number between 1-5 , So bot sends same number of emojis?
Please Help
like if someone type 2
then bot sends two smileys
In the same message?
yes
javascript the king of lazy cheesy functions
That is handy
can you write any example
as i am new in js
there's even a testing box there
Js got a lot of inbuilt functions

chrome devtools: am I a joke to you?
chrome devtools: am I a joke to you?
Imagine using a Google browser
Doesn't every browsing engine pretty much use google
Are we talking about firefox
ye
yea firefox uses google as the search engine for me
As if would be bad browser 
Yeah you're probably talking about search engines
A search engine isn’t a browser engine lol
Browse and search mean the same thing to me 
Hey, I want to make a dashboard for a discord bot.
I already set the page up and the login button but now I dont know further.
How can you authorize the client with a bot and how to get data from this user?
Best thing u can do is block any Google service, Facebook and all trash network wide
By using discords oauth2 flow
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Simply, You must get email and username and discriminator from discord and create a user without password in your database
and then check if user exists, login it in, if not create then login it in
That is purely useless
Discord has oauth2 flow for a reason
Its so you can make requests based on the scopes provided on their behalf
So you can get the guilds the user is in, their email, etc
And its far more secure
cause they have to authorize the connection before it even allows them to login with their discord account on your site
just use oAuth, it will not break if someone changes the username
Which you can use to make requests on their behalf yes
or guilds and ....
yes this is what i said :/
What you said is useless when oauth2 exists
no i said just get email or discord id, because its unique
Why though.
Why save the info in a db
when it can update
Just use the data gotten from discord when you make a request with the access token
and update said data when using an refresh token if its changed or expired
if you want to make your life easier, dont store any userinformations that are sort of critical, you dont want the lawsuite of it when it backfires.
^
Let discord handle that
Dont take that kind of stuff into your own hands when discord does it for you
and gives you a way to do it
then you must create a request everytime for authentication
not Discord, but possible individuals that gets theyre informations leaked
when use logs in, you update the data
What
So you can authorize a user with this?
u can get email too
i dont get why you would reinvent the wheel for logins, if you could just add a oAuth flow, wich handles most of the important stuff
or do it yourself and use the oauth2 docs
no independence to discord
do you make a dashboard for a Discord Bot?
You are making a dashboard for a discord bot
What is independent about that
You need the info discord supplies
and the way you are saying it is you are getting the info from discord in the first place and just storing it anyways.
oh, my usage was different
So why not just use oauth and get it over with
can you send the docs to this?
i had many ways for logging in, because of that i just get the unique data from that platform
I already did
I want to know this too
How to Import any project from repl to Vs
hey
can anyone help me publish a package to pypi?
its saying 403 wrong credentials
Did you fill correct credentials?
token or user-pass?
You prefixed pypi-.. in token?
I never did too, that lead me to delete my package 
2nd
Yeah
can i copy paste it?
Ig so, check if it's prefixed with pypi-
Invalid or non-existent authentication information. See https://test.pypi.org/help/#invalid-auth for more information.```
it is
pypy, aka: pp
Hi. I need help with my bot. It is ignoring the commands that start with the prefix, though it does responds to the content search ones. This is my code: https://replit.com/@OhShoot/ShootBot#main.py
You need to create diff accs on test and stable one... publishing on test with stable's token won't work 
that's what I found in the docs
i wanna publish on stable
obviously
so what do i do/
whats the point of the test branch lol
It's... a test environment
Literally what I do lmfao
Congrats 
That's a rather unique name but congrats fren
Kekw
i did setup.cfg
Technically yeah I believe
Might be a pain to do it without it but
If it's possible
It is possible.
Try installing and using it once
cuz i fucked it uo
You'll have to reupload it iirc
I prefer trying installing it once in a venv and test it
Since dblpy isn't deleted I can tell that you can't rename a package
member.displayHexColor?
@slender thistle https://pypi.org/project/pycolor2/0.0.1/ better?
displayHexColor is a thing on member
also that is black
#000000 is black
#fff is white
It's white because of your theme
It probably isn't using your top role
Better
It should be displayHexColor
well ig maybe not the top
Dunno why it doesn't work
Role caching?
It's your highest role that has a color set
Bruh
Highest role? Then member.roles.highest.hexColor
yea
IIRC
You are correct
I think
Lol
What the heck
Is that a problem with your code or just d.js being weird
That might explain it
If you want the hoist role color it's supposed to be member.displayHexColor
Otherwise that
It works is a bit of a bloat term to use in this particular scenario
right
2 seconds???
why in the fuck are you so fucking toxic?
insults someone's reading ability
"now I remember why I blocked you"
like
chill
Rude
im replying for reference, not to fucking ping you
Its annoying
Neither of you need to argue
because I don't need to ping you 
Because you are pinging them when they dont want you or need you to
You should also get used to people not mentioning you, as it's in good faith
again, im replying for reference because I don't want to say
"#development message 2 seconds???"
like what
throw a fit
cry about it
Doesn't matter what you want
#general message @radiant kraken
#development message 🤷♂️
@drowsy crag Mr. Neppkun over here is being overly toxic and rude
#development message
#development message
#development message
#development message
I usually don't like minimodding but he's just fucking obnoxious
how about just blocking him
I did, but if he's being like that to everyone else too, I don't know what to say
its fucking annoying
They probably did it out of respect
cause it wasn't that important to the situation
He generally is… you shouldn’t care about that too much
but telling everyone to "cry about it" isnt?
eyes
There are going to be things you won't like that society imposes, and a user disabling a mention should be the last thing to complain over.
you guys really are just fueling whatever argument is going on
Mmmm, I don't like this man sorry
development is always weird
I don't even know em but I dont like em already
true
then ignore him
things are being dealt with
Alrighty nom
guys the css looks great on my bot page but the same css doesn't work on my server page
it just shows all the tags
wym
I'll show a picture


markdown 
how u make thosse boxes with the cmds
just with tables
how?

the source code of the first?
idk
not you lol
it can use html or markdown whatever u want
its not working
this:
<tbody>
<tr>
<td>bal, balance, stat or stats</td>
<td>Verify your balance as well as other stats such as case points, amount spent, etc.</td>
</tr>
<tr>
<td>daily</td>
<td>Claim a certain amount of money each day.</td>
</tr>
</tbody>
</table>```
just shows exactly that, not a table, and this is only for the server description, on my bot's description, the same code works fine
tr is tablerow and td is table description just so people know
That is how I remember how tables work
found a html to markdown converter
but I'm pretty sure the server listing part of the site doesn't support html
Does the server page even support to use html?
Well then a html table won’t be parsed to actual html
Never believe what “they” say 
It will always receive the event if it’s online and in the guild.
*events
If you somehow fear aggressive spam define a limit and leave the guild if it’s been reached
A simple timer added to cache with the last sent message timestamp will allow you to calculate the difference between it and the new message which can be at least a simple “rate limiter”
I haven’t understand one word but bots don’t magically assign roles
Only if you use copied code and features you don’t understand
But as I mentioned preventing spam only works if you leave the guild
That’s the only way to not receive tons of message events for example anymore
At least the only way that comes to my mind atm
hey does anyone know what color type discord returns role color as? (example 15277667)
But I think spam won’t be an issue anyways as Discord is limiting the messages to send anyways
Well, hex is just an integer at the end of the day.
yes i want to convert it to #xxxxxx for css use
number.toString(16)
This is Javascript.
perfecto
I made a python package, what should I do in the init file?
If I'm hosting my bot on my pc, how can I see how much RAM it's using? Using the debugger in VSC to host temporarily.
task manager
Yes, but that shows how much ram vsc is using along with it
Ah, found it
you're going to see node.exe processes
I'm assuming it's this process
more than likely
Dang, 114mb for only 10 servers with 100 users cached
I'll have to test how that scales ig
It can be empty. But, you can also import things/define variables so those become available at the package level.
Use number.toString(16).padStart(6, "0") to make sure it's a valid hexadecimal
Will do, thanks!
👍. It's because colors like 0x032abc will return 32abc if you use toString(16)
hmm, nearing 1000 questions in the triviabot queue now, thats insane
i never thought i'd see the day when the bots question queue became as nuts as a bot lists bot queue
Tha Noscum
What is the question queue? Is it a list of questions, or a list of responses that the server is TRYING to send, but simply can't do fast enough?
its a list of new questions that people have submitted for the bot to ask in trivia games @crude egret
each has to be vetted by a human
My bot has a verified seal, but I wanted it to be next to the username, not like this:
Ohhhh. So your bot is a trivia bot that people can submit questions to, that you can then accept/deny?
yes
That is awesome
i thought the mod team was big enough... guess not any more and i'll have to recruit again
code:
problem is burnout, people get bored after a bit
this is where money usually gets involved
since most moderator positions are voluntary in terms of labour, treating it like a small gig/job would act as a form of incentive for people to want and continue doing it
otherwise it's really just for the meaning of the position/status that keeps them going, wouldn't it?
yeah
if i pay money or any kind of thing of value, that makes things majorly complicated
as im taking money to run the bot, that basically makes me an employer in the uk and makes me applicable to a ton of laws and regulations i definitely dont have time for or money for (costs money to make sure youre compliant, especially with remote foreign workers)
Website + websocket/http requests
Websockets are better if you want to make real-time bidirectional updates
If you just want a simple dashboard, http will be the easiest
anyone good with really basic html?
<div>
<input type="text" id="searchField" placeholder="place holder text"></input>
<button onclick="myFunction()">Search</button>
</div>
<script src="https://unpkg.com/axios/dist/axios.min.js">
async function myFunction() {
console.log(`fard`)
}
</script>
it says myFunction is not defined
oof... shift the function in another script tag...
oh my god
i fucking hate html
thanks
no
I agree
All my homies use const https = require('https');
https.get('https://encrypted.google.com/', (res) => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('data', (d) => {
process.stdout.write(d);
});
}).on('error', (e) => {
console.error(e);
}); /s
I was unironically thinking of using http in my lavalink rewrite since centra seems to be having some issues in some edge cases
better yet. Write raw HTTP requests myself
I had to write raw http before. Not fun...
Wtf did my teacher just say:
A group of 16 bytes is called a word/vault
They mean 16 bits? Cuz WORD's a windows term for unsigned short.
we were talking about plain bits
no os specified
well, one of my friends had some random binary text written in his notebook
god knows why
umm
maybe converting binary to decimal might come handy?
👀 recording a video highlighting numerous flaws in PHP, pros and cons and general existence
I think the thumbnail is plenty
Imagine naming all flaws and cons of php when the answer is "because php sucks"

sucks.
here's why.
TCD server










