#development
1 messages ยท Page 602 of 1
ok it'll take a while to find all the pieces though
One command is in multiple files?
it's kind of difficult to explain, but yeah it is
Okay, then just send the code that determines the roll result
html: function(isEvent, data) {
return <div> <div style="float: left; width: 45%;"> Minimum Range:<br> <input id="min" class="round" type="text"><br> </div> <div style="padding-left: 5%; float: left; width: 50%;"> Maximum Range:<br> <input id="max" class="round" type="text"><br> </div> </div><br><br><br> <div style="padding-top: 8px;"> <div style="float: left; width: 35%;"> Store In:<br> <select id="storage" class="round"> ${data.variables[1]} </select> </div> <div id="varNameContainer" style="float: right; width: 60%;"> Variable Name:<br> <input id="varName" class="round" type="text"> </div> </div>
},
I think this is what you're after?
Can you format it in a codeblock?
right
And uhh no
Wait if its a bot why are you writing html?
truth be told I have a program where I put in the logic and it outputs the commands into code
thats why I dunno which files have the code in them
Discord bot maker?
yeah pretty much
Yeah dont use that
I ain't too good with java, I only know a teeny bot of html
it picks a number between one and [whatever the user wrote] and if it's not a number it outputs [NaN]. If the number equals [NaN] it instead sends an error mesasage. problem is I can't get it to detect [NaN] because NaN isn't the actual name of the output value apparently
@earnest phoenix easier said than done lol
dooes anyone know what NaN is called?
@analog basin NaN means Not a Number
yeah I know
but when the number outputted equals NaN it's supposed to redirect to an error message
but it's not redirecting, meaning the output isnt equal to NaN
which I can only interpret as NaN not being the actual value for NaN
so does no one know?
oh yeah also I can't do this manually because my CMD doesnt execute commands properly, thats the main reason I'm using an external program
if anyone knows what "NaN" or basically an unknown number value is refered to as an output that'd solve my problem
weird
I'll try false then
what else can you chose in comparison type?
try exists
oh ok I'll do that
no cigar
it rubs me the wrong way it says "Value to COMPARE to"
you'd have to use exists after the math tho, because if you're checking before, it will be before a NaN is obtained
else you can use regex to rule out non-numbers
good Idea
thanks Tim! you did it ๐
I guess "Notarealnumberlol" is lower than 0 ๐
oh! thanks! I'll remember that because I was actually wandering how it calculated that. I guess it TECHNICALLY isnt higher ๐
wait, does that mean it's not lower either? ๐ค
NaN is not a number
its not a number, therefore its not bigger than 0, it is also not smaller than 0, it is also not equal to 0
ok cool. this has all been VERY insightful
welcome to javascript's weirdness
this isn't javascript
it's IEEE774
aka the standard that defines floating point numbers we use
oh, alright
would a strong typed language still let you compare non numbers to numbers and do math that ends up in NaNs?
well a round of applause to tim for solving this predicament ๐
a weird quirk I found is if you roll for like 999999999999999999999999999999999 etc you can roll a "infinite" which shouldn't be possible so I'm putting a limit on it lol
Huh
-Infinity is also a thing
you get an Infinity result when dividing a number by zero
Infinity + or * Infinity = Infinity
Infinity - or / Infinity = NaN
"javascript best lang"
again, that's IEEE774
you could write equivalent math in assembly and you'd get the same result
this isn't a script thing, but can discord bots get nitro features? I assume not right? I've never seen a bot with a gif pfp.
no, they own some features by default though
oh? which ones?
iirc cross server custom emojis
they had gif avatars for a short period but it quickly got removed because storage saving
woah ok so I can have custom emojis for my bot? Given my bots a hot dog I don't have a use for that, but thats really cool to know.
wait whats the website with all the custom emojis on it?
wait no I'll just google it
https://dunkey.cease-and-desisted.me/i/kdhu.jpg
Thanks to you guys the bot's working perfectly
hey real quick can a bot change an admins username?
I know it can't change the owners nickname.
or atleast I don't think it can
has to be lower in hierarchy
so it can change admins, just not the owner, provided the Bot has top role?
think so
cool I got someone to test it, youre right
NPM: yt-search
question: how to get a video URL?
i use skysilk
isn't that only europe though?
I think so
but there is a small problem
how to host a bot on them i mean i should upload hes files or what
yes
exactly
or do what i did
set up a private git repo
and pull from it on your server
didnt understand is there a tutorial that you guys folllowed or what
https://amazonlightsail.com/ what about this
i mean i should upload my files on AWS or it host from my pc ? ?
google has a free vps for 12 months
i highly recommend it
but if you want to start off with a paid one, i head good stuff about galaxy gate, apparently many bots are using it
amazon has a free for 12 months one also
I used Ovh's $3.50 vps way back when. It was good specs for the price. 2gb ram, 20gb storage, 1vcpu
@scarlet phoenix hey sorry for disturbing you
but
can you tell me how you hosted your bot on Ovh ? i mean what you did ?
did you followed a tutorial or what ? please tell me ;-;
well nop idk what is linux
an operating system
rival of windows and mac
what language and library are you using?
Like tim said, the ovh vps is just a computer running linux. Its like mac os (except no desktop, terminal only) if you have used that.
So depending on what language you use, you will run it through the command line
If you do get an OVH vps they will give you an option of Operating system. Go with Ubuntu, it is just the easiest for a beginner
Does anyone why my bot goes offline after X minutes? Im hosting it with Glitch, and I keep trying to keep it online but it won't work.
it used to work 24/7 and its the only free solution...
But i edited some code and now it just goes offline
use uptime robot if i'm not mistakened
i did
My guess is that (and I have never used glitch) in order to keep this free model they spin you down if its not active.
My reccomendation, spend the <$5 a month for a vps
yes, thats why people use uptimerobot. to bypass that
it's not really recommended
Glitch to patch uptime robots when
you're better off with a vps iaf
Could you just keep a separate thread going and doing something pointless? Or if they look for network activity, just keep sending random get requests or soemthing
and im broke ๐
I can try to do that
Ill make my bot send a message and delete it every X minutes or so
No, it isnt but i dont have any money
Hey is a dbl.errors.Forbidden: Forbidden (status code: 403): {"error":"Forbidden"} due to an incorrect api key?
or can it point to other things
if i'm not mistakened
Idk anything about you, so don't take this the wrong way, but I am guessing you are younger (like still in school) Could you just tell your parents, Hey I have this new hobby where I am coding, its super cool and I might want to make it a career later. I want to be able to do more but I need to put some code on the cloud. Maybe they would fund it ๐
it means that it wanted access to the url it requested
Even if you are lying lol
but it's not allowed to
my bot is kinda cringy so
They don't have to know what it is
and yeah um my parents are broke too
anyone understands discord.js web panel and API connected?
a web panel is not something simple
i know
is a vps like an online vm?
i got it to work
yeah
but now i am getting errors when i run an command
it's a virtual private server
Just a vm on some server in a datacenter somewhere
@grim aspen i get that but the only thing that could be the issue is the key right?
the logs are broken
it says that log.push is not valid
the push is not a thing
so you can install vs code in it
well, usually not
They are usually command line only
Or at least come that way
wELL ACTUALLY
you could install a DE and WM and then remote in I guess
Couldnt you install a desktop if you are on linux?
But most people dont ususally
Like mate
Most unmanaged ones should
but you can set up something like https://github.com/codercom/code-server
if you really need that IDE
Then just VNC in or something
sweet ig
I mean for 3.50 a month (as an example) you be on like 2gb of ram and 1 core cpu
So a DE thats not specifically lightweight may be a stretch
Something like LXDE would work fine though
@mossy vine you can run a DE on a vps
a what
what i'm thinking is a server is trying to connect but it's not the right api key, i'd suggest regenerating the api key @naive ingot
desktop environment
but they usually have no gpus
so you'd have to do cpu rendering
which is slow and would eat cpu
can you manually set that up or is it something that is offered?
obligatory just use vim or emacs
obligatory neovim > *
you can set it up
it's just installing stuff
you could even use ssh x11 forwarding
@grim aspen ive tried regenerating multiple times now, still nothing
@quartz kindle can you help me? you know better than i do
it's with this guy's error with dbl api
show code
not me, but @naive ingot
its literally just the api code and my token
import discord
from discord.ext import commands
import aiohttp
import asyncio
import logging
class DiscordBotsOrgAPI:
"""Handles interactions with the discordbots.org API"""
def __init__(self, bot):
self.bot = bot
self.token = 'dbl_token' # set this to your DBL token
self.dblpy = dbl.Client(self.bot, self.token)
self.bot.loop.create_task(self.update_stats())
async def update_stats(self):
"""This function runs every 30 minutes to automatically update your server count"""
while True:
logger.info('attempting to post server count')
try:
await self.dblpy.post_server_count()
logger.info('posted server count ({})'.format(len(self.bot.guilds)))
except Exception as e:
logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
await asyncio.sleep(1800)
def setup(bot):
global logger
logger = logging.getLogger('bot')
bot.add_cog(DiscordBotsOrgAPI(bot))```
i got approved sometime last night
https://dunkey.cease-and-desisted.me/i/7xim.jpg
My bot's so freaking intelligent
i made him do that
Send request manually
^^^
let me look through the do-
wait what's the issue?
or that
yeah still 403 with a new token
if you're trying to host with a procfile you need to use a capital "Procfile"
wait
any docs on sending it manually
you're using the dbl token right? not the discord token
yeah the dbl token
did you put your token in the dbl_token part?
yeah
well, if all else fails, just post it manually using http
time to take the magic out of the internet
Learn how http requests work
what a fun time
lol
header = {'Authorization': 'YOUR_DBL_TOKEN'}
async with aiohttp.ClientSession() as session:
async with session.post(YOUR_URL_HERE, headers=headers) as r:
# your stuff```
header = {'Authorization': 'YOUR_DBL_TOKEN'}
async with aiohttp.ClientSession() as session:
async with session.post(YOUR_URL_HERE, headers=headers) as r:
r = await r.json()
# now your stuff :^)
I don't suppose theres a value of un empty value is there?
Wym
null?
Undefined?
Idk what you are asking 
Wait unempty value
Ok Ill just stop talking
my bad I don't have notifications on
I meant like can I use an empty space to trigger something
I found a way, but it's a little messy
have a passthrough for numbers, and straight after have a passtrough for text, each one will redirect to a branch, if it's not a number or text, then I guess that means it was left blank
I think so anyway ๐ค
in my head it makes sense
either that oh they put an image in the command hahaha
also @amber fractal whoops I meant an* haha
https://dunkey.cease-and-desisted.me/i/7825.jpg
my method works atleast
What lib
lib?
Discord library you use
DBM is d.js iirc
but the generated code is trash
I just selected a random library
the generated code is pretty bad,
but I barely ever look at it
I upload it to github and have heroku run it through a Procfile
but yeah I'm pretty ashamed that I have to get a program to do the writing for me haha
I'm also pretty sure this was just intended for surface level code tbh
if discord bot maker gives you an empty string when you leave it blank, you can compare with ""
ok thanks that makes this way easier
I was actually seeing errors with my route aswell
thanks again tim ๐
perculiar. it definately recognised it, just didn't do anything it was told
really weird. when it reads blank it just stops.
if got it set to read an error message but it doesn't, it just stops what it's doing ๐ค
well that's really annoying and somewhat frustrating, but it does register that there's nothing there.
i dont know how discord bot maker creates the code structure, but in normal programming you would do something like
if(variable && variable > 0) {
// continue
}```
if it exists AND is bigger than 0
this rules out empty strings, non-numbers and negative numbers
it doesnt help that they cram it into one big block like this lol
ctrl F doesn't work either
this is not actual code tho
you won't see anything there anyway
its more like an instruction set to be converted into code by the engine
yep
darn, I know there's a regular command generator but it adds as an action which wouldnt be an issue if my entire code wasn't built up off of "jump to X action"
well no other choice I guess
I have a question
if
// continue
}```
wouldnt that mean just any positive number?
yes, it eliminates negative numbers
and zero
and 0 yes
HMMMMMMMMMMMMMMMMMMMMMM
I got it
no that wouldnt work
I was gonna say "if it's not more than zero, and it's not less than 1"
but that would only elimenate numbers
WAIT
I got it for real this time
if it's less than 1 letter long
thats also an option yes
yes, but that makes tempVars a function
Tim that's already a function in dbm
oh
oh ok cool I was worried
well i never used dbm so xD
there r 3 different types for variable storage thing of dbm
tempVars serverVars and globalVars
@uneven laurel how do you want to define who goes into which team?
my cmd legit won't let me install the discord.io node, even after clearing cache so I guess I have to use DBM
just create two arrays and loop over each member, if current loop is even, add to one array, if its odd, add to second array
I feel like someone here probably knows why my cmd won't work but I already put in like 20 hours of experience into DBM so no use switching away now
so i have api calls in my bot but they dont come in in order of code rather than the time from the api response
so what func would delay themessage.channel.send so they send in order
you know you can just type cmd in the folder address bar
?
which isnt even a default path so I've clearly done it at some point
yeah that works too
open cmd here doesnt show up but the cmd in the search bar works
it ALWAYS boots up in Jack though
oh for it to open itself on the folder you want you must do it either Tim's or my way or cd into it
yeah but then when I reboot its back to jack
well who's Jack?
hm
how do I get it to default at current adress?
try going into that path yourself
This how-to demonstrates how to easily change the default path in a command prompt.
Many people tend to run the command "cd /d C:" to do so. This is great but
ok cool this'll probably help
also this may seem unrelated
but how do you make small code blocks?
mine extend to the end
`text`
you mean embeds?
I guess
what? this? https://i.imgur.com/JBX6lcQ.png
nahnahnah
this?
this.this
yeah
what almeida said
So, I go to the 8th grade and we are having a programming class after the easter week. My teacher said he was expecting me to know what we are going to make and learn in the class, but when he showed me the code I got a littly confused since he use JavaScript and not NodeJS which is what I write my code in. Literally, he used a function called circle() and it wasn't defined, idrk how it workes with <script> </script> thing but do you guys know if there is a difference in nodejs and the scripts in the html files. He knows I wrote codes and sh!t so he also said that he thinks I'm good enough to helping him teach our class about this but the thing is I'm still in the basics. Also my seconds question that I couldn't find when I googled is about what we are going to make. So... My teacher said we will write a code in javascript and it's like 8 lines of code, and it draws(animates) the Swedens flag, like the yellow stripes are flying cross the screen and the blue rectangles are just wooshing in and created the Swedish flag, do you guys know any tutorial for something like this so I can practice? Thank you for taking your time to read this, and I hope I explained well enough. Sorry if I incorrectly spelled something. :) And please don't say "learn js" since that is just a silly and worthless answer since I provided information about me already trying to learn the very basics in JS and all I asked for was if you guys knew any kind of tutorial for such thing I provided above, because some toxic server have replied with that multiple times and being rude..
jesus
all of my teachers have been useless at educating me on this
hey guys today well being doing coding
what language
no, coding
@dull bobcat sounds like p5.js, not sure tho
what
in html you can have refferels to external files
javascript can be used inside <script> tags in html
a lot of people use css to store formatting
a browser will have many build in javascript functions, such as for accessing the window, the dom, cookies, etc
including canvas
the same way node has many built in functions, such as require("fs") for accessing the filesystem
the browser doesnt need requiring, since its all included by default
this is exactly what I was look for. thanks Almeida
Well help?
@dull bobcat i explained to you the basics of browser javascript, do you need help with something specific? like canvas or svg?
you can also do animations with css only
undefined should be compatible with "exists"
I've got a code block that converts the text to a length number, and a second that detects if there's 1 or more letter, if there isn't it's supposed to trigger an error
@quartz kindle No i can do animations with JS too, thats easy ๐ I just don't know how to create the object
which object exactly?
WOAH IT WORKED NOW! https://dunkey.cease-and-desisted.me/i/y7w5.jpg
a canvas? an svg? a div to manipulate with css?
I might change input as a server variable so I can use this length block universally
lol can't believe how many hours I spent on an empty space error message... who's gonna be dumb enough to try enter a command without a parameter anyway?
@quartz kindle Lets say i want a circle right, and there is a function called circle which creates a circle no shit ๐ Lets say the circle functions have 3 params, the first two are height and width and then the diameter of the circle
circle(100, 100, 25)
And if to get this circle to anime i simple do this
let x = 100
let y = 100
function animate() {
circle(x++, y++, 25)
}
animate()
believe me, people are
haha I actually hope someone does so that the can see what 4 hours labor can accomplish ๐
have you guys tried hosting with Heroku? it's so useful.
@dull bobcat that still doesnt tell me what hes using. where does the circle function come from?
this is a canvas circle: js var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.arc(100, 75, 50, 0, 2 * Math.PI); ctx.stroke();
this is an svg circle js <svg height="100" width="100"> <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /> Sorry, your browser does not support inline SVG. </svg>
it's crazy to think that theres a website that does 100 percent free dedicated server hosting
its not 100% free, it has limitations, bad performance, etc...
and its not a dedicated hosting, the word dedicated means something else in the hosting context
oh my bad
@quartz kindle Im telling you, i have noo fucking idea since this was exactly his code:
var x
var y
function update() {
circle(100, 100, 25, "red")
x += 1
y += 1
}
Im confused, since where tf is circle defined and the update function is never called either how does this code woooork ๐
is he using any library?
my only complaint is I wish I could change region, an aussie server'd be nice but beggars can't be choosers
Idfk bro @quartz kindle he literally went into a site and showed me his project
๐
what library are you using @dull bobcat
Read the information i provieded ^
And then you might know that im not the one running the code :))
then who is
he has to be using something, you have to ask him
circle() and animate() are not native functions
he either defined them, or is using a library
uh hi, using discord.js
code:
and I get an error:
Error: Cannot find module './Storage/coins.json'
any idea why is this happening?
is this the only file where you require coins.json?
are you sure there is no coins.json in any other file?
yup this is the only one
I just started coding this
never required the package before
file*
.json
do you have a folder named Storage?
i dont see it in the ss lol
is daily.js being called from another function that resides in Storage?
nah it aint the Storage folder as u can see contains .txt files only
and in this SS I dont have coins.json in the Storage file
but as I write the code in GitHub due to me hosting my bot
I do have it in there
Need link of this server
dont use json as a database
also in the screenshots youre requiring coins.json from the same folder
so in production you actually have coins.json in the Storage folder? but in your local setup you dont?
you probably want ../Storage/coins.json
because the code you showed is not using the Storage folder, is looking for the json file in the current working folder
but your error says its looking for it inside the Storage folder
yeah the ss is a bit outdated like 10 mins cuz I re=wrote the code
nah @idle basalt got it I needed ../Storage./coins.json
thats what i just said
just saying, use a real database -- not a json file
like?
there are a million of them lol
whats the easiest one to handle
sqlite is more than enough
probably something local
but you need to learn a bit of sqlanguage
like keyv
btw tim ty for ur effort
if you dont want to learn sql, there are many libraries that abstract it for you into something similar to JS maps
a lot of beginners use local storage dbs like lowdb, keyv (with no provider), enmap, quick.db, etc
theyre relatively simple
witch one do ya suggest for me
any of those
keyv is easy since theres a whole section of the official d.js guide on it
quick.db is an abstraction layer for mysql iirc
enmap uses several databases, depending on which provider you chose
it only uses sqlite now
ah ok
she updates it like every day reee
she?
evie
nice
can someone join my server real quick and test out a command I wrote?
"wrote"
I'm admin and owner so how it works for me won't be the same as a standard member
lmao
does anyone know a bot that interacts with selly.gg and you can write !order (order-id) and gives that person a rank?
nope
neither
Okay Good evening all
Im after a bit of help with regard to uploading my bot to the new bot section
i have tried adding my server description in markdown and html and im getting invalid server format
how do i fix this
there is no server description, unless you're adding a server
in the "servers your bot is in" you should add the server IDs
the command I need tested is
!callme aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
'!callme !callme michaeland then!callme michael` again,
I just need someone to join my test server real quick and copy/paste those in there
please DM me if you've got 30 seconds to spare
or make an alt and use it for testing
yeah I guess that'd work if no one else will join
99.9% of people wont be willing to join random peoples servers to test bot features
you can make your own alt account and test it yourself
@earnest phoenix try to warp ur elements with divs
yeah I guess I just figured it'd be a lot easier to just ask someone to copy/paste the written commands
@dusty cipher that has nothing to do with his problem lol. he said hes getting "invalid server format", which happens if you dont put server IDs
there's a leveling template for DBM? this sounds good
Can bots change their own avatar
oh
@late hill in d.js?
Eris
Gimme a sec
I thought the bot icon needed to be changed from the developer portal nvm
oh
eris ๐คข
It's better at scale than Discord.js
Eris, a NodeJS Discord library
Is eris still better than djs master?
Correct
My bot generates images using canvas, up to 5000x5000 resolution
๐
Takes less than a second on average
On googles 600mb ram vps
800x800 takes 50-70ms to generate
Including a shit ton of trig math
Canvas is fast af
๐
which files do I need to update on github with DBM?
i dont think anyone here will help with dbm
a couple of people here seemed to know a fair bit about it
Hi I have a little trouble with the ping command to display the latency, could someone give me help?
what is your lang and lib
Js
it's a little embarrasing being the only person who uses dbm here, it feels like I'm being looked down upon in the same way a pc gamer looks down upon an xbox gamer
Discord.js
well yeah dbm is a piece of trash and spending money on it is like burning it
haha I didn't pay for it
My bot responds: NaN ms
show code
put end time - start time in parenthesis
ok this'll take a while to load for me cause I got garbage internet
else you're doing "pong" + endtime first
js is not a smart boye with types
oh and tim solves it just like that, he always solves everything in a second flat
it's impressive really
lmao
well when you dont use dbm maybe youll learn something
99% of the questions asked here have 1 second solutions
go away pretentious pc gamer
haha yes
Thank you very much it works!
๐
more than 60% of questions here can be solved with a google search but the askers iq is usually lower than the percentage of questions
I don't think that's accurate
its probably too small of a percentage
not to target a specific person forgot to mention
a lot of questions are literally just asking for something thats in the docs for their lib
"how do you delete a message"
I'm sure you guys are all super genuises at birth but some of us are new here, and I think this is an excelent learning resource.
dbm
excellent learning resource
choose 1, take it or leave it
wow ok I thought I was an xbox gamer but clearly I'm just a mobile gamer
being a noob doesnt mean you cant google your questions or read the docs
mate stop bringing up your epic ๐ฅ ๐ฏ gamer stuff
help why is my iq offline
we were all beginners at once, however learning is not asking questions you can google or research yourself. there is quite a difference and using sarcasm to prove otherwise is a stupid contradiction
lmgtfy
ok yall seem to think I'm retarded just cause I use a program to help with the scripting -__-\
nobody said that
discord bot maker has a server anyways. why dont you ask your dbm related questions there instead of here, where almost noone uses it
again, i bet that <5% of people here use dbm. they have an official server, why not ask there?
someone will definitely be able to help you there
instead of everyone trying to piece together how the software works
ok one of the questions I asked was specifically about DBM.
one of them, which I assumed might be common knowledge with non-beginners
i dont think dbm even counts as development
AH. there it is
its like saying excel scripting is game deving
am I not developing a bot
if you are making a game with scratch are you a game developer?
deep and serious philosophical questions right here
cmon guys
development includes anything that you "develop" regardless of tools
ie: image development in photoshop
the topic doesn't say that
thank you tim, I'm glad someone agrees with me
guys help this interface is too hard
"Channel for chatting about (bot) development"
that's not a dbm thing
did you also know that dbm has support servers etc
I see
as you can see, I have been asking for support from there
If the question relates specifically about DBM I ask it there, If it's about general bot creation I use here
As far as I remember that is not a thing on DBM
unless you are using a cracked version of it
(talking about the screenshot you posted above)
is !=== valid javascript code?
I do not understand why my bot says the message several times yet in the code everything seems correct to me...
!= is the opposite of ==
!== is the opposite of ===
alright thats exactly what i need ,thanks
I don't use the program because "javasript is too hard" I use it because it bridges the gaps in my knowledge, I still have to make commands, variables, and such, I can just do it in a format I can understand.
Yes I am on, the message when the person leaves is good but that of welcome No...
that's not to say they're on the same difficulty though, DBM is designed to be user friendly
what do you need help with
does anyone else here host with github?
is this in MS visual studio code?
Yes why?
you're new here right?
Of course...
MS visual studio will pick up on any basic errors after you've saved your file atleast once, so that'd be a good starting point
@calm token did you recheck your ids, code seems fine to me
Deacon, just ask your question
all of my questions are answered
Yes I check, but it varies sometimes there are 4 or 10 welcome messages
And the software does not detect any errors
stop trying to sound smart you literally havent contributed a bit @analog basin
@earnest phoenix stop thinking I'm disabled because I use DBM
you literally just told me I was "trying to sound smart"
Ratelimits ?
its not saying you are disabled
hugo, what exactly is happening there
no you're saying I'm clueless -__-\
"all of his questions are answered" Peter
My bot announces the welcome message many times
o
how are you running the bot
well the only error I have is I don't know which files to update on github but that's not really crucial
hugo ratelimits are basically rules that limit how many of actions can be done within a timespan, they are dynamic but the guideline is 5/5s for bots, meaning you are allowed to send 5 messages within 5 seconds
I'll just update all of them
Deacon, what you really need to update is the data folder
if you updated mods, upload the actions folder as well
if you have it running on a seperate server then be careful you don't run it from your pc aswell that can cause some confusion haha
Hugo, send you message event
thanks @gleaming tulip
most likely is what is happening, I don't see a reason for it to be spamming welcome messages
Hugo, try running a normal command of yours
the code doesnt present a loop
see if it spams as well or just runs once
The code is higher in the conversation
its maybe subscribing to an event multiple times
yeah but that one you posted looks fine here
Okay wait
or you have multiple bot instances running
but why would it cry
no idea
thats what I said
either it has multiple instances running, is responding to itself or is looping the event for some reason
ive seen people subscribe to an event within an event subscription making it add a handler more each time the parent event fires
Normal command work very well
oh yes
It's just the welcome message
Hugo, do you have the guildMemberAdd event inside another event?
screenshot your code around the guildMemberAdd event
higher up in the code
The guildMemberAdd is just one time throughout the program
it's inside of your message event based on this part
same for the guildMemberRemove
move the guildmemberadd + guildmemberremove event above the message event
yeah
move the guildMemberAdd & Remove off the message event
else it will run them everytime a message is sent, that's why it is spamming
Where do I move it?
like that?
no
not like this
client.on('message', msg => {
client.on('guildMemberAdd', member => {
});
});
but like this
client.on('guildMemberAdd', member => {
// your embed stuff
});
client.on('guildMemberRemove', member => {
// your embed stuff
});
client.on('message', msg => {
// your commands
});
sorry
what xavin said
So
How would I go about using the data from an api
I know how to send info to the api to get something back from it
I think I was wrong again
But my problem is the fact that I donโt know how I use the data I get back
whats your lang
js
๐
do you get a json response
Yeah
@calm token you need to send the embed like you did before ofc ^^
also i hope you didnt copy these 3 again in your message event
how are you getting the response from the api
https://www.w3schools.com/js/js_json_parse.asp @broken elm
sorry I can not, I do not understand your explanations, I'm French I try to understand better what you say
you can keep your message event where it is Hugo
just remove the guildMemberAdd and guildMemberRemove events outside of the message event
otherwise they will be ran each time a message is sent
I created a bot called Obedient Bot to help with my testing purposes and he won't execute a single command I give him. I'd be mad if it wasn't so ironic
did you turn it on / is it online
yeah
check the bot log
unless you run the bot in cmd or something else besides dbm
does it error?
doesn't even say I've done anything lol
no Hugo
don't put events inside other events
just separate them, like if they were independent functions
I don't know how to execute in cmd, last time no matter how many guides I looked up I couldn't get bots to execute with it
is it a possibility I bricked it when inviting it to my server?
when generating the link I didn't have any permissions ticked under the impression he'd just have default everything, in hindsight its a possibilty that it's just deprived of all rights
atleast it said something I guess
it's supposed to mimic what I say back but for some reason he just doesn't listen rip
what
someone hijacked my bot?
excuse me?
someone just jacked my server kicked everyone and is now in control of my bot.
regen your token
and remove it from github
no -- it's people have scraper to go through github and find public available tokens and do shit with it (most likely that person is not even on his pc atm)
move your token in a config file and google for "how to gitignore a file" and dont upload that config file to github
that bot didn't even have admin in hindsight
this is him
before he started messing with crap his name was "OHMEGA"
well anyway this "obedient bot" hasn't executed a single command I've told it
what a waste of 3 hours
you have your bot's token on github
that's true, will heroku be able to read my token if it's private though?
actually heroku has a slot for that
I'll just update all my github stuff real quick
you can say bye to security if you are using free hosting
put your github to private
I don't think heroku will be able to make sense of my files if I have it on private, I'll replace the key with a fake
and then add an exception on heroku
worker: node bot.js
I need this for later don't mind me
or just don't have a token at all
?
will heroku be able to read private repositories?
you'll need to give them permission to do so
you can just create the private repository
Or gitignore
create the heroku project, and then go to the Deploy tab and connect your github repository to it
also this is gonna sound like a stupid thing to say but I only JUST found the delete repository button, how can I delete only one folder from the repository?
You should never even have configurable data in code
how did you push stuff to github
how did I upload the files? I've never heard the term push so I dunno exactly what that means
yeah how did you upload the files
created the repos and just drag/dropped everything except resources, and instead of node_modules I did xtend and also the actions folder from DBM then I added a Procfile for the worker node
dunno if that answers your question, hope it does
uh
I'll take that as a no?
so you want to remove the node_modules folder
yeah I uploaded the xtend folder instead of node_modules
you don't have to upload the node_modules folder
actually, you shouldn't update the node_modules folder
do I upload the xtend though?
no clue what that is
oh ok well your the expert
never seen that folder
How to delete a file and folder from github.com repository using github.com's web interface? I searched on Google, but haven't found any answer.
I have found about how to do using commands
How...
what version of the program are you using
beta?
I got my advice from a 40 minute unedited video when they do this and blare 3x speed anime intros and called it "nightcore" so I don't trust it
I'm using the web default
I mean dbm
where did you get dbm from
truthfully... igggames
well I mean I'm making discord bots
I've looked at the video guides and their version looks the same
the xtend folder is one of the 100 and something folders in node_modules
i know
well I think this is a 6 month old build
so it's a pirated program then
yep
it's past 1.4 I know that much is true
the only legit way of getting dbm is from steam
yeah
It's not that I don't think it's worth it, I just can't afford it
i can understand that
this is not a thing either https://cdn.discordapp.com/attachments/272764566411149314/566343823601565731/unknown.png
(you sent that in here)
yeah haha I photoshopped that
ah
everyone was implying I was stupid and used this as some "cheaters way of making bots" or like that and how it's equivalent to "calling myself a game developer because I've been on scratch" so I sent that and said "GuYs I DoN'T KnOw whAt to ClIcK"
yeah mine looks pretty legit
brb
if my bots down for half the time does that mean it'll be declined?
I got it on heroku but it's been down constantly so I could improve it
first obedient bot wouldn't execute commands, then it started doing its own commands
so now
I've taken down every instance of it
and
it's still online
this might be the most disobedient bot of all time
did you reset the bot's token?
oh yeah the token got leaked
they might have dmed everybody
well, the bot is not here so
it takes a while for discord to update a bot's status when it goes offline (to make sure its really offline)
and your bot has to be online when mods review it, else its declined
but there's no way of knowing when they're gonna review it
so if you want your bot approved, have it online as much as you can, and leave developing to either before you submit it, or after its approved
i only submitted my bot after developing it for like a month, to make sure it was stable enough and actually useful for people to use
Please approve my bot
in awaitMessageReaction can i put "time: 0" ?
honestly not sure if this goes in api or here but my bot randomly goes offline a good few minutes after launching, i host on my computer as of the moment, console says the bot is still online but in discord everywhere they appear offline. runs on 4gb ram and in 20 servers
nope
also @earnest phoenix what language
and to add, my bot goes back online 5-30 min later
is there an error
something is making it crash or become stuck in an infinite loop, or large delay
]]moreinfo
If you want people to be able to assist you, please provide more information, such as what library and language you're using, the code in question and what you are trying to do and/or what is causing the error.
And only know badic html
pick a language
pick a lib
can it make coffee? (the bot)
C++?
sure
Is that a good one?
Im only comfy w/ html rn
in the end, theyre basically all the same
well html isnt a programming language but a markup language, so unfortunately you wont be able to make a discord bot from that
hard to learn?


