#development
1 messages · Page 1785 of 1
He used it in a string
unless you want to add more characters into the string
When i put map without the strings it fails
big assumption, yes
he asked why that snippet wont work
fair
MessageEmbed field values may not be empty.2:43 AM
Webhook usernames may not contain Discord. 2:48 AM
Didn’t have enough patience to go on yesterday… 
How can I check for voice channel updates?
I have
@Cog.listener()
async def on_voice_state_update(self, member: Member, before: VoiceState, after: VoiceState):
print(member.id, before.id, after.id)
But nothing is printed
Do you have intent added?
Which intent specifically
Yo wtf?
I do have all intents enabled, just checked
This one. Not sure what that is in d.py
Just like how you enable other intents https://discordpy.readthedocs.io/en/stable/api.html#discord.Intents.voice_states
How can i add thumbnail ?
I tried setThumbnail(member.displayAvatarUrl()) but doesnt work
It's displayAvatarURL(). If member is actually a GuildMember, use member.user.displayAvatarURL()
Yeah, I have the same problem, The requests on the api, works from outside, but not from the node itself
The Web Server is active, requests from outside work and tried with server ip and the port too
idk the cause either so im blaming isp/router
The Api is hosted on a ubunto server with a ptero panel and my premium bots are on the same node, but cant fetch on the api, just from outside.. Thats kinda weird.....
It worked thanks
hey quick question
does spawning mutliple culsters improve performance and latency?
why is the security bot down
perfomance yes, since the requests are spreaded on the cpu cores (Ideally Worker_Treads are equal to Cpu core count)
@tired panther
whats that for a bot?
Join their Support Server
it sends me here
sure?
Kinda ironic that its offline
Eh, it would be ironic if the bot is called "Uptime Bot"
I guess if it's offline it can't provide "Security"?
what about the computations? does the time taken to complete a transaction/computation decrease? compared to without multiple clusters
what does, setInterval returns, a number?
if yes then what is this?
@types/node says it returns this
so what is this Timeout thing
just an interface name?
Well an interval is basically a repeating timeout
so, i have one more question
lets say i have 2 cpus and 2 works have spawned, p1 is being executed by worker1 and needs to take some time 60 secs. if the same function is called. now worker1 is busy so worker 2 picks it up. what happens if the same function is called the third time?

Hey I want a music bot
Cool.
those things are not really automatic, you have to decide what the workers should do when they are busy and code them accordingly
How can I make dashboard?
(dont worry i already reset the token) does my bot's commands not work because of the prefix?
the command:
Message event?
it depends on how u r parsing the message content

im new to this what you mean
well if ur a beginner this will help u to get started https://discordjs.guide/
xyz is pretty cheap
so i suggest that
Hey i have a doubt in web development
Bit unhealthy 😅
So what's the iissue
why
you can see the console if something is logged
Are you sure the path is correct?
It's under data folder path js right ig
There's a error i can't catch
¯_(ツ)_/¯
Can you say where i am missing? 😫
@slender thistle hey reply
@sick agate reply 😟
Try to make the path relative from wherever you import the image
discord.js
how to set GuildMember.voice.setMute(false) if the participant is not in the voice channel?
you can't
I have a mute command. it turns off the microphone for the participants if someone turns it on for them. when removing the mut, I cannot turn on the microphone for the participants if they are not in the voice channel at that moment. how can this be fixed?
how to play music
or basically any service that offers music
in my coded should i use msg or message?
anyone that can pass me Nicole's account?
@zinc fable
Yup theyre dming me, ty 
for getting bot accepted It must works without any permition?
at least I know and I have a month to change my code
you can have commands that need permission
my bot was declined bcs removed the reaction in a embed pages
wym by removed, from the decline reason the reactions did nothing
huh?
wrong bot token
nope
i regenerated it
and put it back in the code
oh i found the problem
nvm
looks like i didnt find the problem
I mean, the error states that the token is invalid
The only reason it would need manage messages would be to remove the user's reaction after they react, which isn't necessary for the bot to function
this Is the reason, declined for a line of code
but for example, for moderation and clear message, how can work without manage message?

hello, i have a problem where whenever someone sends a message without the activator i get a error as well as my work command isnt working. everything was fine till i made the work command and ive been looking over and over again at my code yet i still cant find the problem
https://hastebin.com/winolafoha.js
error for the work command
error when someone sends any messae without the activator
Well then just return the event if the content doesn’t start with your activator aka. prefix.
You’re declaring and using args, command without checking it they actually exist or at least contain items
hmm, someone pinged me 
-The Welcomer api is hosted on the ptero node
- The Bot is hosted on the same ptero node, but on a other port
When I try to send a request to the Welcomer api from the Premium bots, it fails with the error Econn reset/refused
But, when I send a request from my Pc or a another machine, then the request is successfull
maybe this gives you more information
is md5 safe?
Hi again, how do I make my bot to check for pings?
client.on('message', message =>{
if (staff.includes(message.author.id)) return;
if(message.author.bot) return;
if(message.channel.type === "dm") return;
if (message.content === "<@ID>") {
message.reply("Please **don't** ping Moderators unless It's an emergency.")
}
});

Wdym by pings, like specific role pings, @ everyone or @ here pings, or a specific user being pinged?
@gilded plank
users
🙂
As in, any user, or a user that you specify
but how 
holy fucking shit... PSU1 fan @ 10k rpm 
I have no idea ok
Literally <Message>.mentions.has(<ID of a user/role/channel>)
OH
new feature https://imgur.com/drUtCwq
Unix timestamp?
yeah
alright, good to know
Local timezone or UTC?
local probably
use latest canary
<t:13069566:R>
i can see it as i m using canary
😉
is this a bug @summer torrent ?
lol
if it was i would report it
i have passed bug hunter test now need to report bug huh -_-
@summer torrent how is this = <t:13069566:R>
my uncle born that time -_-
is it true that, doing arr.length = 4 to remove elements in js, doesnt gets garbage collected
u mean to remove it, or disable it?
How can i copy an object X and create another field called Y in updateMany? Mongodb
disable it
I hvnt tried it but I think, u should be able to re-add the components with same configs. when u get interaction
gg tried to install canary, got it from Canary.discord.com its still the stable client. gg
It does
oh wow, thx to clarify
pog
make sure you gc just before setting the length
so its more correct ig
what garbage is it going to collect then
me?
if i do node . and my bot comes on will my bot be on as long as i have an internet connection and my pc is on?
infinitely
as long as internet and pc stay and you don't close cmd
Not always.
ok
yes also your bot could crash
Or Discord could just disconnect you
yeah im gonna get a host then
how? im curious now
should i use PebbleHost or Vultr
i've never heard of either being used for discord bots
Discord occasionally disconnects bots for whatever reason
i'd get a vps
hm ok
@unreal tapir get a vps, or if you need a free option use heroku or repl
ok
Vultur is quite decent, you can even get a 3 months credit for a free VPS if you look for affiliate links (you usually find them with Tech youtubers)
and the "Free" VPS suck
they limit what you can do
I only use bot ghost when im making bots for dumb servers
lol
bc no one knows where they store the tokens
then just buy a Raspberry PI and run the bots on them
you have 2 instances running of the same bot
const Discord = require('discord.js')
const client = new Discord.Client();
const config = require('./config.json');
client.once('ready', () => {
console.log('Ready!')
})
client.on('message', message => {
if (message.content === '>ping') {
message.channel.send('Pong.');
} else if (message.content === '>beep') {
message.channel.send('Boop.')
}
});
client.login('token');
its not directly code related
most are
let path = window.location.pathname;
window not defined
then I did
let window = " ";
then
cannot read property 'pathname' of undefined
can you help pls
Are you using Node.js?
I tried that in repl in said go to html so i did
?
you use " to define a string use `
ok
"${string}" //-> Will print ${string}
`${String}` //-> Will print whatever your value holds
```you can see the difference here

I think yes
nah man, no difference there
The window global object is not available in Node.js, use global instead
ok
This error ```js
cannot read property 'pathname' of undefined
how do i fix i will Send code in a second
Those properties are not available in Node.js, to get the path you can use __dirname, to access the current file name you can use __filename
you put ` inside "
replace " with `
} else if (message.content === '>serverinfo') {
message.channel.send('Server name: `${message.guild.name}`\nTotal members: `$message.guild.memberCount`');
}
yea this wont work
} else if (message.content === '>serverinfo') {
message.channel.send(`Server name: ${message.guild.name}\nTotal members: ${message.guild.memberCount}`);
}
see the difference?
yea
ohh ok
well there are 3 ways to define strings in js, but only one allows you to parse in values
a workaround would be joining the values to the string
Where I did that this stop working
if(path.match(regEx)){
message.channel.send("Server name: "+message.guild.name+"\nTotal members: "+message.guild.memberCount);
```this would also be valid
nah its just woo doing its thing
Can you show us what path and regEx is defined as?
Just __dirname, not global.location.__dirname
ok
thx so how can I make it open a tab and go to a website
To the route's callback?
yes
What is route an instance of? Try logging route.constructor.name
can I show you full code
Do you know a way, I can save mutes, so my bot will unmute them correctly in time?
At the moment I am using a time out:
setTimeout(async () => {
try {
member.roles.remove(role);
} catch {
}
}
But if you are using another command while this timeout is running, the timeout will abort
I can use a database if this is an solution. Any suggestions?
Sure, but use a bin if the code is too long
if i kill the terminal in my code editor will my bot go offline in a couple minutes?
yes

can we?
use a VPS

Not sure how you could send a callback to for it to open a tab to those routers because the structure of the callbacks is unknown, you could additionally use puppeteer
ok whats best free bot host
The only thing you could currently do is using a database and saving the timestamps on an interval and set thrm up again when the bot restarts
free is always pretty bad, but replit can do for small bots
Hmm so should I save the values WhenMuted and WhenMuteTimeRunsUp and how do I check then If the time ran up?
I'm trying to make a wifi router
Just save the date of when the user was muted by Date.now() and when you're about to save the current remaining time to unmute you could subtract Date.now() with the one you saved before, and on startup, you could set a timeout to unmute them
how can I make it a wifi router
I think this can help you https://github.com/RanjeetR/freeWifiRouter
query GetCommunityGuides($input: {championId: Int, role: String, userName: String}!) { this is the first line of my graphql query, I get an error with the { is there any other way of defining the types? I'm using JS not TS
merhaba
How can I fix this?
var client = new Discord.Client({
partials: ['MESSAGE', 'CHANNEL', 'REACTION']
})
türkçe yardım eden var mı ?
??????
main lang. is english
You wouldn't define arguments like that.
You'd have each one of the parameters be separate.
you need to add intents there
e.g.
query GetCommunityGuides($championId: Int!, $role: String~, $username: String!) {
# ...
}
also dont use var
lol
they need to be put in as an object tho
const variables = {
input: {
"championId": 23,
"userName": "XXX",
"role": "TOP"
}
}
As Erwin said, you need to supply intents.
new Discord.Client({
// ...
ws: {
intents: [...] // https://discord.js.org/#/docs/main/stable/typedef/IntentsResolvable
}
})
That would be the case if a field argument you're using it for was an input type.
well yes, there is a custom type for input but since I'm using js and not ts I can't use that type
thats why I need to find a solution
which one?
It would be easier to solve if I knew the structure of the field you're using it for.
wdym which one? in your client
well I'm new to graphql
Idk what u mean with structure
its not my database it's me requesting to an endpoint
I sent u the query in dm
Umm is there any way I get notified whenever a track is added to a playlist in Spotify
I'm using python
Does someone know how I could keep my mongodb cached documents uptodate without a change stream?
u know if u press the print screen button it takes a picture of ur screen so u dont have to whip out ur phone
If anyone got a lead pls ping me
You could check to see if the API has any feature to subscribe to new tracks being added
hey im kinda new to coding and wondering if someone can help me!
im trying to add the feature to my bot +welcome-set (#channel)
i know how to do it so it sends it in 1 channel with the id and i was wondering if someone could
maybe give me some one can just give me the code to it as i need help
This Is The Channel ID One I Did
member.guild.channels.get('channelID').send("Welcome");
}); ```
No it doesn't I've been looking into it

which intent
It seems the feature is not built into the public API.
the ones u use/need
also maybe I am just stupid but I have never worked with them bevore. Why does this say "Missing ",""?
The general way to subscribe to new updates would be through a websocket connection.
But I don't see any use of that in their public API.
I guess so BC they do have one for app I think
it shows an error there
remove the {}
There's polling (where you repeatedly send requests to check for changes), but it's not as efficinet.
how do I find out which one I need?
thx
Well then I do need to store the previous data then compare
And all
This was the first thing I thought
it depends on ur code and what you use
But then if there's some way to get the update directly from the Spotify
It would be good
@signal estuary n
fuck
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
there
wrong clipboard
I need them for buttons I think because when the buttons nodes werent installed it didnt throw an error
cant find in the docs which one I need
interactionCreate
Did you enable the intent for the event?
still does throw the same error
const client = new Discord.Client({
partials: [
'MESSAGE', 'CHANNEL', 'REACTION'
],
ws: { intents: ['interactionCreate'] }
})
require('discord-buttons')(client)
const { MessageButton, MessageActionRow} = require('discord-buttons')
hi
what do you mean with "_"?
INTERACTION_CREATE is an event, not an intent; if you're trying to use components, either read the documentation or search up on your error if you're getting one
yea
i just need some sort of code that helps me with per server welcome messages
so I was making the Router with the same package and got this
docs typically has that stuff
I think you gotta change core.require('util') to require('util')
i cant repl wont let me edit the package
Then rip
ik
you need the intent to use the event voltrex.... thats how the gateway works
if you dont specify the intent on the gateway you just wont receive it
wait can I use a host
What "intent" are we talking about exactly, I know how the gateway works; are you trying to say that they don't have any intents specified or they need a specific intent?
clone the npm package with git and require it from there like
mkdir core
cd core
git clone url .
cd ..
interactions
they need the intent for that in order to receive the events
which is why their buttons arent working
cuz they didnt specify ANY intent
so the event never triggers

So they just didn't specify any intents, I thought you meant they don't have the "interaction" intent and I was confused
my .gitignore
/.idea
/dist
/node_modules
/Wifi-tester-win32-x64
tip: add your .idea ignore to your global gitignore config file
@signal estuary You gotta need a few intents to receive that event, GUILDS, GUILD_MESSAGES and GUILD_WEBHOOKS, specify these on your client options and test it; add other intents if you also need them
are you using repl.it?
yes
and you want to modify a npm package?
Btw here's a list of intents if you're willing to add more
smth in my node_modules
message.channel.send(new MessageEmbed().setDescription("This is a description of an embed."));
How can I get the message ID of this so I can edit it?
I solved it
Resolve its promise and access its <Message>.id property, e.g.
const m = await <TextChannel>.send(...);
const id = m.id;```
my index.js is having this problem
require is not defined
my node having this problem
My bot doesnt react to this. No errors no message just nothing:
client.on('interaction', async interaction => {
if (!interaction.isCommand()) return;
if (interaction.commandName === 'ping') {
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomID('primary')
.setLabel('primary')
.setStyle('PRIMARY'),
);
await interaction.reply({ content: 'Pong!', components: [row] });
}
})
Does anyone know why?
.. oo.. thanks! 🙂
still nothing
Have you tried logging anything before the if statements to see if the event is emitted? If it doesn't log anything then you're still missing intents
yes, still nothing
yes I changed it
And the result?
I got this code from there: https://deploy-preview-674--discordjs-guide.netlify.app/interactions/buttons.html#building-and-sending-buttons
And this is from today
That's strange, the event was supposed to be called interactionCreate not interaction
Anyway, did it still work?
djs moment

ok I got in the node modules that was there
core = require('cornerstone'),
util = core.require('util'),
Great time for erwin to plug detritus
BUT HAVE YOU GUYS HEARD OF A BETTER LIB THAN DJS CALLED DETRITUSJS? ITS GREAT LIB, SHOULD SWITCH



No idea about that
we got large bot scaling
sharding
great chache
customizable cache
faster startup speeds
16x sharding support
slash commands handler
buttons helper and builders
and much much more
wink wink

all the cash that goes into your wallet right now...
ik,just a guide is missing for it like discordjs.guide
evie is working on one

it takes for me 4mins for 4 shards
Oh god oh fuck, Erwin about to talk about detritus 24/7 in development
First time?
this is the index
var app = require("app")
var bw = require("browser-window")
app.on("ready", function () {
mainWindow = new bw({
width:640,
height:440,
resizable:false,
icon:"asset/wireless_tower_2.png"
})
mainWindow.loadUrl("file://"+__dirname+"/index.html");
})

This happened probably a million times already 

That happens in the app dependency, those dependencies are probably outdated
nor do i get paid
its legit just a good lib

php

I just find it very obnoxious. Constantly promoting one library and shitting on the other for a long span of time
thats the point, yall see it a lot cuz you are a casual here
is it possible to use discordjs to create a generic invite to the discord server that is not linked to a channel?
but new people see it once and prob never again
if you have an apple, and a rotten apple, which would you praise and recommend to eat?
i use djs as a comparison since its what everyone uses it
not my fault the lib is in that sorry state
i use Tims library
even the original devs left it
discordjs-light
takes 4 months for them to add stuff
yeah they outdated
var app = require("app")
var bw = require("browser-window")
I need to find smth else
5 if you consider lib devs have access to private beta before they are even out
to give them a head-start when the changes are deployed
you dont see that in ANY other libs
I don't mind criticizing one library and praising the other, but constantly doing that gets annoying (for casuals).
d.py, drb, none of those libs have the struggles djs goes thru
in all honesty, its less about detritus and more about finding an actual good lib, eris or djs light
in the state its shipped in, djs is shit
i see your point tho, but still, we see it a lot cuz we are casuals
If erwin was paid to shit on d.js, he would be a billionaire now
so are invites always tied to a channel with discordjs?
im referring it more as memes or to actual new people
It seems so.
It is on all libs including Discord itself
pretyt sure invites are tied to channels always
dangnabit
even from here
pretty sure it just dumps you on the default channel
or the first one
i never actually checked which channel it picks when you do this
it sends to default channel
@earnest phoenix do you think this will work
https://www.npmjs.com/package/node-wifi
Try it
is the default channel always the first item in the channels array?
i guess a guild could have no channels
i assume its system channel
ohhhh, i'll try that out on a few server
they add the check for read permissions
actually
against getPublicRole
that'll lead to categories
so iterate through the channels until i find a channel with read permissions with whatever the getPublicRole is
i wish discordjs did that for me
isn't the public role always @everyone
not sure if u can change it
but if its there, there should be a reason for it
unless its just there as a easy placeholder for the variable
public role is always everyone
java people are just planning ahead for if/when discord lets you change it
that's one of the best things about getters tbf
not to say the data processing you can add to them
just dont use member functions that rely on the state of the object
when i write java i never use models. only List and Map
by models you mean objects/classes?
POJOs
POJOs ftw.
embrace to pojo
how does detrutusjs handle the cache? my vps is very smol.
good question, i just know its really optimized
you have the option for custom caching
When I am trying to send a button, I get this error: TypeError: resolveString is not a function
nice, i'll have to move over to that library at some point
@proven lantern
if u got questions about it, like, structure wise(not code wise), its better to ask there
85 members and already verified? :O
cake should be back today/tomorrow
its an official discord lib
discord bots in php sounds fun
but it works,you can even make advanced bot with ,but you have to use php-cli
sounds like pain tho
mark zuckerberg likes php
what would be "advanced bot"?
facebook put a lot into php because of him
Image generation without graphics api by calculating
pixels and etc
None
my bot is advanced
ah you mean mine then 
jokes aside, pixel stuff it pretty basic
and way less complex than it sounds
pixels and colors are magic
nah
r+g+b = white?
pixels are defined as p = 0xRRGGBB
weird colors
0-f
0 means no color
for example, a blue pixel would be 0x0000FF
bruh my stuff got closed
https://stackoverflow.com/questions/68040826/js-wifi-router
f means 16
no
yes
16
means 12
f is the 16th digit in hex
9 -> a -> b -> c -> d -> e -> f
yeah yeah sherlock
the romans didn't like 0
I already said that 4 messages above
they disagreed with it
what language is that?
but anyway, pixel processing is dead easy when you figure out you're not supposed to directly manipulate the rgb value directly
but extract its channels, manipulate them individually and re-pack them into rgb
my question was ok but I asked for to many things
No, your question was just bad.
but why
people want to see the world burn
the world would be brighter with javascript types
localization would like to know your location
yes.
merhaba ben şöyle bir şey yaptım fakat botum sesli kanaldan çıkmıyor ben çıktığımda.
hello, I did something like this, but my bot does not come out of the voice channel when I leave
why ?
your ID wouldn't be in newstate, it would be in oldstate
you need to fetch the newsState.channel.id
msg.guild.channels.fetch()
not for a specific channel
every voice channel the bot is on
translate ile bu kadar oluyo galiba
No, you don't
To sum up, how should I write the code finally?
message.guild.me.voice.channel.leave();
trying ...
What should I write instead of 'get'.
has
Is the ID in the screenshot your ID or the bot's?
bot
ah
get returns the value in the map. has returns true if there is a value for the key
so yeah, you want a boolean, so use has, or if you use get check to see if it's 0 or null
I don't understand exactly what to do 😄
I'm confused
btw code works perfectly on me
i'd get the guildId from newState and then use the discordjs client to fetch the guild. then do guild.me.voice.channel.leave();
alla halla
bende mi sıkıntı var yaw
const guild = await client.guilds.fetch(newState.guild.id)
you sure that's the correct id of your bot
get yerine has mı yazam
yes
)ingilizce mi konuşmam gerek ?)
okey may firent
trying ...
it does, but anything like an empty object would come as truthy, should use proper methods to return bools when using if's
oh
you can just use newstate.guild, lol
you're right
I'm really confused.
shit like this is where typescript intellisence comes in handy
you know that the channel state must be changed to work this event right?
isn't newState a GuildMember object
when you typing it out it should tell you it can be null/undefined
/* Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.
PARAMETER TYPE DESCRIPTION
oldMember GuildMember The member before the voice state update
newMember GuildMember The member after the voice state update */
client.on("voiceStateUpdate", function(oldMember, newMember){
console.log(`a user changes voice state`);
});
GuildMember.guild would return the guild object, I think
unless js is fucking wild
which is probably the case
ts would tell you lul

js is literally the definition of this emote

it just runs it, even when things are wrong
then you have to wait until your code reaches that error so you can finally fix a bug
yep
be it by a user or a bad event
are you talking about oop?
The bot isnt sending the buttons and I dont know why:
var Discord = require('discord.js');
const { MessageButton, MessageActionRow } = require('discord.js')
exports.run = async (client, msg, args) => {
const row = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomID('primary')
.setLabel('primary')
.setStyle('PRIMARY'),
);
msg.channel.send("test", [row])
}
hes just sending "test"
js is amazing, but its just too lenient
bad for coding, good for executing
if u write good code, it'll work flawlessly and amazingly
howver if youw rite bad code, it wont tell you
it'll just run it
thats where typescript comes, so when you are coding, you can see errors like that
for example, you guys dont know if that payload is a member or another event
just make sure not to let people write bad code in your codebase
js will tell you that too if the library was written in ts
ts is great for libraries
intellisnce in general
partially
not fully
ts comes in for that
specially cuz djs does have ts declaration files
theres no real reason not to use Typescript in all honesty
you can set its configs to be lax(aka you wouldnt notice the difference from js) and simply enjoy the intellisence
the best way to organize your code is to make a bunch of different functions that each have their own file
1 file = 1 function
and gasoline
this needs to be refactored
AND es5 syntax

use import/exports, its been a thing since es6
named exports will be your salvation
fat rip then
bot is not
funny its called nextjs but its not nextjs
bot is nodejs
its oldjs
they think they are ESNext, but they will get shut down like they always do
dont try putting annotations in ES
i'm using vercel's nextjs
the real nextjs
my project doesn't have a config file
oh, nextjs does support es6
@drowsy crag free ban
speedrun before the other mods yoink your ban quota
frick, aurel got it
ayo
fuck hope all my homies hate hope
wow ok nom
yes, lets go with that
short
bonk
how to handle fame
How can limit user to use command for example they wanna send me messages but i wanna let them to this one more time
Im using discordjs and quick db
are you using a command handler?
no i just like how the profile pic looks
Wym?
just store remaining usages on the db
prefix is not defined??
Idk how to do it lol
create a table of id-usages pairs
i'm going to assume you aren't then
I'd recommend WOKCommands
ID | USAGES
12345 | 3
12645 | 0
12521 | 1
16832 | 1
12249 | 0
12128 | 2
then just get the row by user id
OH
there
if (!message.content.startsWith(prefix) || message.author.bot) return;
^
ReferenceError: prefix is not defined
wha
answer is "none"
unless by site you mean service
afaik there are only 3 sites that allow bot hosting directly on it
those being glitch, replit and heroku
all 3 have their pros and cons
and a helluva more cons than pros
there's some that sell bot hosting but they're not very good kek
what if its your own old code 
still don't tbh
ty.
I cant count how many times I rewrote my old code just to find there was actually a better way to do it
remember: you're better than your old self
Do any of those sites do bot hosting for free?
all 3 are free
O
but note this part
and a helluva more cons than pros
you're so wise :)
i've used heroku and repl but i recommend repl
also heroku has paid versions if you want
dont pay heroku, it's so overpriced that you could buy 2 vps with the price of it
i haven't checked prices lmao
idk
anyone here have experience with linode? i've heard its good
i'm seeing all this once I sign up what do I press?
is that repl?
glitch
if youre going to use glitch just go repl
alr
glitch actively tries to kill bots on their service
sheesh
they publicly said they dont want bots there
ye
can you dm me the site?
repl took the burden out of glitch
they're probably going to go back on that futurely
bots severely clutter free hosts
alr
just signed up into the site what do I do next?
When i do node . and do my ping command >ping i get the error ReferenceError: prefix is not defined and i cant find a way to define it
do you know how to define a variable?
Use glitch
Not best but good
A little bit yes
glitch doesn't want bots
you're literally going against their ToS by doing it
yes or no?
just follow the tutorial
oh wait
that's you
mb
I keep mistaking your pfp with jordan's
Before creating a discord bot, it's a good idea to learn at least the basics of your language of choice. Not knowing how to debug simple problems such as an undefined variable will cause a lot of frustration on your end, and on the end of people attempting to help you.
So to host the bot its a script?
basically you'll do just as if you were hosting on ur pc
well, that's the template code
alr so hows it gonna for like the code
Is this where the bot gets on?
I'm knew to this alot
lol
new*
I recommend reading more about discord.js and javascript in general
is there any typings for lavalink or should I just make a typings lib myself
anyone in support?
How do you do image manipulation? (Discord.JS).
by using canvas
and also you should watch Worn Off Key's video about it
he is big pogger man
does someone know if js already supports 64bit unix time?
Kind of?
finally
@slender thistle buttons work pepega https://i.imgur.com/rVYPOgA.gif
no more reactions 
Lmaooo gratz man
Can anyone help me out?
Don't Just Say "Hello" in Chat.
just ask the question
I can't delete the published server
@opal plank Hello
detritus
And I want to recreate everything I made
discord-rose
what server? recreate what?
context
I wanted to advertise my server in top.gg like creating a voting system and all
So I did the steps as instructed in it
Now I want to delete everything and start the setup linking with vote tracker
To get detailed and personalized info
It track votes yes
then you should ask in that bot's support server
I don't know the commands of dsl
The problem is in top.gg
I created everything in top.gg
are you logged in?
Yep
and?
They said to delete invite in dsl
And I can't get that part
And do you know the commands of dsl?
i do not
-ping
Pong!
That's all I think
Anyone here ever worked with Dash components in Python?
Is your client up-to-date?
?
shows for me (Beta)
Hey i got stuck with syntax in python
like
'2NeSirLM2VHQW4upn0nMfB',
'6sx0aPkil4NYXKAbnMsoxg']
'id_2': [element_1, 2 ,3]}
i wanna add the new elements to the list
tried but doesn't work
>>> d = dict(mykey=[1,2,3])
>>> d
{'mykey': [1, 2, 3]}
>>> d['mykey'].append(4)
>>> d
{'mykey': [1, 2, 3, 4]}
smth is really wrong with me now
😛
@near stratus how you made this reply style ?
that's what replies look like
does anyone know any pat api's 
I'v a obj like this
const obj = {
fun1: (a: A) => {},
fun2: (b: B) => {},
}
const AB = // A | B
I want the AB to be of type A | B. How can I extract the types from the parameters
So why don't for me 
message.mentions.users
i just guessed, u hvnt provide any errors
😄
can u see the difference
you dont
you import them
uuh... just assign AB to A or B?
A must be defined somewhere
what's that question
since its an explicit declaration, you need to import it from whatever you assigned it
I know, but I want to extract it instead
i dont think IN keywords for functions
Seems op reply 
there's a utility type Parameters<>, which might help I guess
thats a very rare and non standard way of doing it tho
i'd recommend asking in discord.gg/typescript instead
questions like that are rarely answered here
the only people i know that use typescript quite througouhly to be able to answer that would be me, feud, xetera and perhaps tim
both me and feud said we dont know
@woeful pike , know this?: #development message
ooh, actually this worked
Parameters<typeof obj[keyof typeof obj]>[0]
const obj = {
fun1: (a: string) => {},
fun2: (b: number) => {},
}
type aa = Parameters<typeof obj[keyof typeof obj]>[0]
why would you ever need to use thiiiiis
this is almost as fucky as my keyof typeof in mix
if you want to make a function that works with a valid input for any defined function
Im making a package, and want to typecast the return types from users inputed object.
now go make a json parser in typescript types
"resolveJsonModule": true done








