#development
1 messages · Page 773 of 1
And then if it's bigger
Would need to shard both aswell
And use much more reasorces for something that could be achieved with the same lib
I can't think of a single reason to mix languages tbh
Unless you're trying to interact with thinks that the current language doesn't support there isn't rlly
Why would you shard a single cog
That just complicates everything unesserarily
And like for example
I use Clojure integrated with python for my bit
Bot*
So python can handle EDN files
Edn files?
They're a file format we use
Ah
@bitter sundial I added boots 8 days ago. When do you look at the time interval
Ok thanks
Oh really? Nice to know
Actually, how do you guys send a data when a user registers to the bot?
I don’t need the steps to send the data. I need help on how to receive it to the bot in NOJE JS
@dark oak can you rephrase your question
Yeah sure.
It’s basically like, how do you receive a JSON call from a website to a bot in node JS?
uh
what http library are you using
you'll need to use an http library to request to the server to return JSON
Oh.
node-fetch and axios are popular
I use node-fetch
But I kinda from google I learnt about it and came to know that we could fetch a JSON from a website.
you can
But what should be the event for the bot?
there is no event
Should the code be in the index.js then?
So, I am basically trying to send a JSON call with a web link, whenever a user sign ups a page.
So, how can the bot receive it?
@modern sable is mysql much different from sqlite
i've never used sqlite
Fuck
const fetch = require('node-fetch')
const { RichEmbed } = require('discord.js')
module.exports.run = async (bot, message, args, c) => {
const { file } = await fetch('site').then(response => response.json());
message.channel.send(file);
}```
Is this right? @vital lark. Am I correctly pulling the Call?
👍
const fetch = require(“node-fetch”)
let array;
fetch(“https://bla bla.com”).then(r => array = r)
console.log(array);
Will this work if I add it to my Index.js @vital lark
I am sorry for disturbing you..
ur not really disturbing you
but r is the response object which will return that
but yes it will
Yeah lol. I am poor at naming them. Ok 👍
question : I'm coding my bot in js, and I want him to execute a code over and over again with a one minute pause during each execution. How can I do that
setInterval some function
a setInterval will exec the code once
you're thinking of setTimeout
pogchamp my assumptions were wrong
I think ye
setInterval and setTimeout looks the same
setTimeout is only once
it's a timeout of a function that only calls once
so yes, shivu is correct
One message removed from a suspended account.
One message removed from a suspended account.
oh god
One message removed from a suspended account.
F#
@slender thistle the query's are basically identical
fuck im out of here
what's f#
Just slightly different function calling
You're obviously wrong, they're not the same smh
Clue in the name which isn't the same so the entire syntax is different

One message removed from a suspended account.
Yes
One message removed from a suspended account.
no stop
One message removed from a suspended account.
f# is barely readable for any functional programmer imo
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
check out kotlin
Kotlin is pretty sexy
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
use brainfuck
One message removed from a suspended account.
One message removed from a suspended account.
Id rather be unique
@sage bobcat make a bot in C
thats a big F tbh
I mean, it's possible
if you really want to be unique, use an esolang
good luck finding one that has working websockets though lol
if only esskeetit (an esolang) had websockets
it depends on your preferences
Whitespace, lolcode, brainfuck
if you're into oop
im not
but sometimes i python
=help
lol dw
One message removed from a suspended account.
@sage bobcat make a bot in C
@sudden geyser
Actually possible with libdiscord
One message removed from a suspended account.

One message removed from a suspended account.
i just use dotnet CLI / visual studio to install packages from nuget
One message removed from a suspended account.
dotnet add package <pkg>
One message removed from a suspended account.
where ever the proj file is
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
design differences
One message removed from a suspended account.
they're both equivalent in difficulty
One message removed from a suspended account.
One message removed from a suspended account.
no idea
both being hard if you don't know C# 
probably because dsp is a revived version of a dead lib
One message removed from a suspended account.
One message removed from a suspended account.

d.net's been around for longer so it got a bigger rep
but d.net is more prone to breaking
and it makes more unnecessary requests
Was there Disqord
yup
One message removed from a suspended account.
i'm switching to disqord
One message removed from a suspended account.

One message removed from a suspended account.
disqord is still a wip lib
but it's way more performant than both libs
and offers stateless REST
One message removed from a suspended account.
Looks simple for someone who only just learned basics of C#
yeah @sage bobcat
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
are you actually trying to write a bot in F# @sage bobcat
One message removed from a suspended account.
One message removed from a suspended account.
isnt that.. quite a jump
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Hey guys. Is it possible to directly send a message from a website to a discord bot in node js?
yes
How? @modest maple
How can that be done with Webhooks? I am confused on this part. Can you explain me with exampl if possible?
Oh. How can we do that with a discord bot?
Java, Eclipse
Quick question, I need Maven for Eclipse to be able to run my discord bot? 🤔
you'd need to create some sort of webhook system on website side and bot side
Alright.
Trying to make my bot play music but i keep getting "opus isnt loaded".
I try to make it load but it is just refusing to.
How do i fix this?
@modest maple How do we check if there's any new post by a webhook? And hwo to pull the message?
thats gonna be research on ur end
look up how webhooks and APIs work and how to make them
do u even know what a webhook is
Yes I do. I tried to pull the data with the bot recognizing awebhook. But it just becomes an infinite loop since a bot's command just makes the trigger to respond infinitely.
all messages come through the gateway
you should be able to check if the message's author is a webhook
Could i get some help?
Trying to make my bot play music but i keep getting "opus isnt loaded".
I try to make it load but it is just refusing to.
How do i fix this?
How is it refusing to work
It keeps throwing an error.
I added ```py
if not discord.opus.is_loaded():
discord.opus.load_opus('libopus.so')
To my code, And it still doesnt work.
If you must know, Im on Linux.
and what is the error
@neat vapor
Java, Eclipse
Quick question, I need Maven for Eclipse to be able to run my discord bot? thinking
Click New Project..., then find Maven Project, and then follow starting steps for Echlipse in JDA (Java Discord API) Wiki. And yes, you should start with JDA even if you planned other, cause JDA has best docs for making discord bot in java, but when you have more acknowledge, you can switch to ex. Discord4J
Voice cannot be used because libopus is not loaded.
Try discord.opus.load_opus('libopus.so.0')
Thank you Rad.
@slender thistle
Jan 22 08:32:32 chipthewolf python[24198]: Traceback (most recent call last):
Jan 22 08:32:32 chipthewolf python[24198]: File "/usr/botv2/bot.py", line 13, in <module>
Jan 22 08:32:32 chipthewolf python[24198]: discord.opus.load_opus('libopus.so.0')
Jan 22 08:32:32 chipthewolf python[24198]: File "/usr/local/lib/python3.6/dist-packages/discord/opus.py", line 150, in load_opus
Jan 22 08:32:32 chipthewolf python[24198]: _lib = libopus_loader(name)
Jan 22 08:32:32 chipthewolf python[24198]: File "/usr/local/lib/python3.6/dist-packages/discord/opus.py", line 81, in libopus_loader
Jan 22 08:32:32 chipthewolf python[24198]: lib = ctypes.cdll.LoadLibrary(name)
Jan 22 08:32:32 chipthewolf python[24198]: File "/usr/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
Jan 22 08:32:32 chipthewolf python[24198]: return self._dlltype(name)
Jan 22 08:32:32 chipthewolf python[24198]: File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
Jan 22 08:32:32 chipthewolf python[24198]: self._handle = _dlopen(self._name, mode)
ignore system name 👀
not the full traceback
it is?
no
I also get OSError: libopus.so.0: cannot open shared object file: No such file or directory
that last part was legit the most important thing
@neat vapor maven makes it a lot easier
Can I ask why? 🤔
If you add the discord library that you want to use then it automatically adds all the other libraries that are needed to use the discord lib
I created the first versions of my original bot without using maven and since I started using it it got a lot easier to upgrade to new library versions
@slender thistle fix?
Let me check my non-existent handbook
Thank you for the advice WhiteSpirit.
How did you install opus
What does ```py
import ctypes
print(ctypes.util.find_library('opus'))
Are you not using a separate SSH client
I am?
@slender thistle
Traceback (most recent call last):
File "test.py", line 2, in <module>
print(ctypes.util.find_library('opus'))
AttributeError: module 'ctypes' has no attribute 'util'
What

idk
Customisable moderation is almost finished for my bot!
cool
Slowly working through a to-do list aha
smol
Rather small now
@eternal adder what lang
Python.
:)
also, here's the list:

sure? as long as there's no risks of it being nsfw
This is ads neko
true
what exact command did you use to install libopus?
that'd by why, you didn't tell it to install
pip install opus?
i said
idk
sudo apt-get install libopus
if i remember
well, apt-get libopus gets it without installing it
sudo apt-get update && sudo apt-get upgrade
did those when i got my VPS
you sure? hmm
i did
lemme check my vps
Did you install opus-tools
strange, the phrase opus seems to be completely absent from my music cog but it works fine
yes, my discord bot's music cog
hmm. even more strange
Did you install opus-tools
ooh i think i know why i'm not using opus
ffmpeg works instead
ill be back
ignore that i just installed it
RaVen.
Discord. Uses. Opus.
you wont see it in ur code

try from ctypes.util import find_library
Now load_opus that
alr
Would RestSharp perform requests faster than built-in Webclient?
Would RestSharp perform requests faster than built-in Webclient?
use HttpClient
@earnest phoenix Because right now I use WebClient It works fine. A bit slow but I have no clue what would happen If more than 2-3 users do it at the same time.
webclient is ooga booga way of performing requests
HttpClient has async support and tim berners lee worked on it himself
Alright thanks I will look at it.
Because sometimes It is a bit slow to finish the request and actually perform an action.
@slender thistle i get FFmpeg not found even though it is installed?
you need it installed through both pip and apt
Installing it through apt installs ffmpeg itself, while installing it through pip installs the python wrapper for it.
can someone here review my command rq
what language?
python
sure, i'll take a look
dm?
preferably in this server, but okay
@client.command()
async def userinfo(ctx, member: discord.Member = None):
member = ctx.author if not member else member
roles = [role for role in member.roles]
embed=discord.Embed(colour=member.color, timestamp=ctx.message.created_at)
embed.set_author(name=f"User Info = {member}")
embed.set_thumbnail(url=member.avatar_url)
embed.set_footer(text=f"Requested By {ctx.author}", icon_url=ctx.author.avatar_url)
embed.add_field(name="ID:", value=member.id, inline=False)
embed.add_field(name="Guild name:", value=member.display_name, inline=False)
embed.add_field(name="Created at:", value=member.created_at.strftime("%a, %d %B %Y, %I:%M %p CST"), inline=False)
embed.add_field(name="Joined at:", value=member.joined_at.strftime("%a, %d %B %Y, %I:%M %p CST"), inline=False)
embed.add_field(name=f"Roles ({len(roles)})", value=" ".join([role.mention for role in roles]), inline=False)
embed.add_field(name="Top role:", value=member.top_role.mention, inline=False)
embed.add_field(name="Bot?", value=member.bot, inline=False)
await ctx.send(embed=embed)
their
What about it
it seems good
ok
roles = [role for role in member.roles]
Why not just member.roles
and @slender thistle how are you a library developer?????
I maintain dblpy
Somebody out here who coding with PyCharm?
@modest maple heyo read above cutie
i do @regal saddle
Do you know how i can get a Prefix Command?
like change the prefix for the bot on discord servers
what does pycharm have todo with that xD
im kinda retarted atm
you need a database
check if custom prefix is used in right guild
😄
I've literally gone for writing a python dictionary to a text file to store things
dont use a text file as a db
Ehh
tbh it works
NO
Handle it properly
DONT DO IT
too late
Just open it once and work with it in cache and save the data on bot shutdown in it
its too late when you have to transfer several hundred files to a db because it become blocking
JSON database isn't bad if you handle it properly
Also if you're looking for a large bot you should use an actual database but if it's small-medium one you want to make eh
Hello Guys,
Idk how to use Lavalink in js, can someone write me an easy example with bass bosster shuffle and this stuff (allrounder) that i can test? that would be cool 😄 .
That's more like spoonfeed
I think there are many examples for Lavalink
can anyone help me make a server greeting custom so the server owner can change it?
which library are you using
discord.js
client.on('guildMemberAdd', member => { const channel = member.guild.channels.find(ch => ch.name === 'member-log'); if (!channel) return; channel.send(Welcome to the server, ${member}`);
});
What's with all the shit about json
theres the code i have
JSON getting shat on as a db
Json isn't an optimal storage method of course, but as long as you handle file reading/writing properly it's an OK way to store your data
you're stealing my words bro not cool :(
it isn't
json lacks in data types and has strict formatting rules
it was never meant to be a database
it's meant for quick object serialization
I said not optimal...
But yes, it is an OK way to store data, if you don't have time or resources or whatever to set up a database (and or can't be arsed to learn SQL)
@slender thistle 
❤️
i mean
ORMs exist
you don't need to know sql to use sql databases
and there are some nosql databases too which are better alts to json
@earnest phoenix Using HTTPClient resolved all issues thanks.
niceeee
And those require server setups. Which isn't always available.
Well. There was no issues just WebClient being really slow.
anyone know how to have a custom server greeting from server to server?
not all sql databases are server based @stable horizon
I meant all the nosql ones
there are also nosql serverless databases
@cloud hollow You could store messages somewhere.
@cloud hollow And check what message is assigned to the guild on join.
Right, I'm done. I stand by what I said. Json is an acceptable way to store your bots data. End of conversation from me.
it quite literally isn't but ok
people keep saying that until they get burned on data corruption and formatting issues
As JSON he's talking about MongoDB?
no, quite literally json files
Storing data directly in .json files locally?
yeah
Hi, i want make my bot who have 3K servers in other language, this is french bot but i want make en language on my bot, what framework or system i can use ?
@lofty hamlet What language you use?
Wait that's irrelevant.
I use C# and If I had to something like this I'd use CultureInfo.
No clue what would be the equivalent in other languages.
nah nathan
json 
cultureinfo is for system based stuff
datetime formatting etc
they want an actual translation of their bot's responses
I have a friend who has ~400 Json files for their bots multilang system lol
Nah, works perfectly fine
Yeah but the code is shit i think
@earnest phoenix I'm pretty sure you can use CultureInfo for translations.
@lofty hamlet You could make a file and store your translations like someone said earlier.
ideally, you'd use something like Crowdin, but if that's too much, have a file system where each response is translated in a json file for each country then name the json file the country ISO code(e.g en.json for english or de.json for german), then you'd save the guild's language (their ISO code) in a database and based on that pull the translations from a file
you'd obviously load the file into mem to prevent reading it over and over again
@tiny tinsel store in one json file with array ?
I know this but I was looking for a simpler solutionI know this but I was looking for a simpler solution
Well hello again,
Has anyone a idea how to make a loop and shuffle command with the Dispatcher thingy and discord.js?
I need some quick help in Discord.JS I have a uptime command (https://pastebin.com/DKDFFY4u) that provides no response when executed.
No Errors no Dep Warnings.
where is the name/aliases?
Bot doesn't use those yet
I know what you mean
exports.conf ect ect but I don't have those setup yet
Right now I have a basic command handeler finds the commands folder and executes the files in it as long as they include .js
you need a name/aliases for run a command
All my commands run like this with no problems
Like I said it executes JS files as commands
Example: ```let commandFile = require(../commands/${command}.js);
can i add 8.28e+7 to my discord bot
8.28e+7 is that fine to added
@median skiff what is 8.28e+7
23 hours
what do you want to do
it for my cooldown
can you explain clearly?
show us where it runs from @hoary elm
for the bump command i am making i am setting the cooldown to 23 hours but i dont know if i can added it like this
8.28e+7
Standby
remove the + @median skiff
This is where commands are executed from currently. https://pastebin.com/QLAfCnrt
Uses FS to search the commands folder for the file and then executes that if it's called with a prefix
You should consider using hastebin
Yeah I thought about that after I noticed how crowded pastebin made it
I can re-upload somewhere else
It's a basic command handeler I used just to get the bot running I do plan on changing it in the future
But for now it works
Nothing happens when you try to use the command?
No bot provides no response.
No logs?
No errors
ok
I have the logs set to show what command was used
It shows the command was executed but nothing else
oh
console.log(`[Orcinus] [${message.guild.name}] [${message.author.username}] ${row.prefix}${command} ${args}`);```
that thing
right
Yeah
ok
It shows that in the logs but the command doesn't actually execute 🤷🏻♂️
Add a log to your catch
for when the if condition is true
Because right now you just return
That's probably where it ends up
Right now this is the only command giving me issues.
Maybe you messed up the file name
@modern sable When you were setting up MySQL, what did you choose as serverTimezone
Or the location of the file
i didnt choose anything so it probably defaulted to system time
One message removed from a suspended account.
UTC might be better tho
One message removed from a suspended account.
One message removed from a suspended account.
@late hill I'll look into it.... Thanks again
Yeah UTC sounds good
MySQL is yelling at me for not setting it up
I haven't even gotten to at least import any MySQL wrapper in my code
Oh yay it works
One message removed from a suspended account.
If I had control over the project I would
Traceback (most recent call last):
File "D:/Innkeeper/BotStart.py", line 164, in <module>
MonsterCommands.LoadFiles(Paths=PathsDict)
File "D:\Innkeeper\Commands\MonsterCommands.py", line 36, in LoadFiles
Monster_Server.loading(Paths)
File "D:\Innkeeper\Servers\Monster_Server.py", line 84, in loading
executable_path=Paths["GeckoDriver"])
File "D:\Innkeeper\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 174, in __init__
keep_alive=True)
File "D:\Innkeeper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "D:\Innkeeper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\Innkeeper\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\Innkeeper\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: permission denied```
sorry selenium what the fuck?
PogChamp rip
i got permission denied from my own site 
actually that might be my router blocking it
Back to fucking schemas
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: users.charId
[SQL: INSERT INTO users ("charId", "userId") VALUES (?, ?)]
[parameters: (228154604638634689, 290923752475066368)]
(Background on this error at: http://sqlalche.me/e/gkpj)```
please god
may someone end me rn
WHY DF WONT IT WORK JESUS CHRIST
oof
its having a fit
over nothing
am i the only one
who doesnt understand
why it doesnt like it
You already have a user with that charId in the table?
its a blank db
we havent even got past the adding part yet
class UserDB(User_Base):
__tablename__ = 'users'
charId = Column(Integer, primary_key=True)
userId = Column(Integer, nullable=False)
thats the layouts file
def add_character(self, userId, charId):
New_User = UserDB(userId=userId, charId=charId)
self.session.add(New_User)
self.session.commit()```
thats the actual function that does it
Stack Trace Full:
how do I check in discord.js if the message does not contain attachments
Check out Message#attachments and check the size
@modest maple are you 100% sure it's blank
ive reset the DB each time ive tested it
I've finished my moderation cog, improved music, and added support for a custom prefix!
@modest maple after you create and before you try to add that value check your empty db with https://sqlitebrowser.org/ or another sqlite viewer to see if it's really empty
its getting deleted and remade each time
its some sort of issue with it being 'unqiue'
omfg we found the issue
fukciung
one array
was getting called early
and that made the thread crash
but the system then tries again
because somtimes pages time out
and then it would break because it would update rather than commit
ahh
now to find out why the hashing system isnt spitting out a new hash each time
Can a bot mute a user in voice chat so that the user is muted only for the bot?
Like you can mute someone without giving a server mute
why
because bots can receive audio data
if I want to receive audio data from a few people and not from the others then I want to mute the other people without giving them a server mute
i hope you're aware that every user has their own stream and you can choose whose stream you want to read
hmm, so far I have only been testing it with only myself in the voice channel
Thank you for the info ^^
@slender thistle ez fix
Make a helper class that has mongo method names but executed sql
executes
mongsql

coming to you soon
I still have to do the SQL queries so fuck it
I should make that
how can i do something equal to this?
embeds
h
sorry link
const name = args.join(" ")
if(!name){
return message.channel.send("Indiquer le link pour le test")
}
const url = name
const res = await fetch(url).then(url => url.json())
console.log(res)```
```UnhandledPromiseRejectionWarning: FetchError: invalid json response body at "link discord" reason: Unexpected token < in JSON at position 0``` this works with Instagram but not with discord links
are you sure it's actually json
and that you're not just attempting to parse a html page
are you even fetching from a valid webpage
and why are you making 2 consts that are the same thing
..because it doesnt? did you install it?
yes
i thought it was youtube-dl
but when putting it into code dont you do youtube_dl?
what
What
Any ide/editor with good intellisense should finish the import for you so you don't have this problem, especially if you're a beginner
any jetbrains ide
T
@fiery stream production level app?
@tiny tinsel ya
Depends what is it.
I dont know something like photo vault
Mobile app?
Sure.
Does anyone here have raid protection in their bot?
I have one although it prevents raids by having users fill in a captcha before gaining access to server. Although its my personal bot
Interesting. I was just wondering what your methods were aha
@modest maple whereabouts are you? I know in the UK it is common, to the point where practically everyone has a static public ip
UK it isnt
It may seem static
But BT, Sky, Virgin etc... All have dynamic IPs unless you contact your isp
The only difference being is that they usually only change when your router restarts (this is true mostly for BT lines)
Sky's system normally changes IP once a month give or take
I just have to static IP lines with a DNS server and other shiz
- use code blocks for our eyes pls:
```java
<code>
``` - Please state what the code should do
ok
Explain the issue
and if a error occurs, please tell us
no issue in the code i was just joking
Alright
it work prefect
then please refrain from putting random code blocks here if you dont need help
do u know any jda host?
Such things can, when repeated, lead to a mute / ban
thank you.
do u know any jda host?
no
ok
Host it yourself?
Most VPSs will be able to run JDA
whats the most popular and well documented js library for bots ?
discord.js
thx
There's also Eris but it's a little more advanced from what I've heard
5 wasted minutes (my nitro expired a few days ago)
@late hill well I'm fucking lazy so stfu

I'm also stupid as all shit and I can't do it myself
"wasted" many things you do in your daily life are probably a "waste" depending on how you look at it
Existence is a waste
can't argue with that
No depressie in my Dev chat

hello
I now wrote ~ set game Hello World in my bot's playing section.
instead of playing it, it takes the command ~ set game, how to fix it
Lib and code?
CF8 is asking what your library is and what your code looks like
what is cf8
Well you made it so that when someone uses the command setgame the bot changes its status
what is argresult
isn't setGame deprecated
I'll let this human being read the docs and suffer the pain of coding
Also it looks like you're args include the command name
Their problem to suffer
Yus
sadap
13
What exactly is "argsresult"?
Sometimes I think too many people think coding is cool
Read the docs
@west raptor
Coding is actually hell created by other nerds to compete with one another over who is more sad
What
setgame Hello World
It also seperates the nerds from the people who don't read
this is the result
What is argsresult
Where do you define argresult in your code?
👏 👏
when you say?
Where, not when
do you have an arg split?
Where are you saying this is what argresult is
Show us where is argsresult definied
where i use
No where you define
Where u created it
split it by the first arg after the command that was run
The start of ur code

show us where you define argresult
With a line similar to js const argsresult = ...
Yea this
hes splitting on "" instead of " "
well the command is being run and whatever is outputted is including the command ran in their case
?
you probably want to do .split(" ") not .split("")
problem ~ set game Type Hello World ~ set game is getting yide instead of problem
i already told you how to fix it
it's what tim said
Wait a sec
how can i fix it
Use setActivity instead
// without space
.split("") = ["!","c","o","m","m","a","d","etc"];
// with space
.split(" ") = ["!command", "argument"];
where will i write
in your .split

you did .split("")
One of reasons why there should only be one person helping instead of all at once
@quartz kindle if you have teamviewer can you do it from there
no
Tim explained it very clearly
command in the upper floor @quartz kindle
yes
Between the two '
Shit is bad when Tim is facepalming
Click left
jesus christ
Inside the apostrophes
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@rustic veldt what languages u talk
Even spoon feeding won't be enough
leave a blank of cut marks
One message removed from a suspended account.
Do you speak Turkish
Turkish English
One message removed from a suspended account.
Yeah you don't speak English well I can tell
This isn't a language barrier
Arrows are global symbols
That any regular person can understand
If args[0] also has "-" and the rest of the args[0] other than "-" is under one command of the bot, the bot will send a message
(djs)
Is this a question
yes 
Hi, I'm trying to do a clean command. But I get an error
//The code part in which an error.
message.channel.messages.fetch({ limit: 5 /*some number*/}).then(messages => { message.channel.bulkDelete(messages)})
Error code :
TypeError: message.channel.messages.fetch is not a function
(discord.js)
what is your djs version
11.5.1
fetchMessages() for v11
Thx
I am using join(",") for convert to string. How can I remove this commas?
.join(' ')
That looks like you have a lot of empty elements in your array
yes
You could filter the array
unless there's a way to do it with including \
maybe filter out the empty elements in your array before joining it?
which is as simple as .filter(element => element)
because an empty string will resolve to false
Can bot stream like user?
Very highly doubtful
But if the input data is provided by you, you might want to edit that so that it simply doesn't have that many empty strings
not that i know of
bots can not stream video on discord as far as i know
it is not documented in the api documentation
discord probably also realizes that it will mostly be used to stream movies
pirated movies
yeah
ah yes, love doing that on Discord
I think the only thing related to discord streaming that bots can do is checking if someone is live streaming
bots can't receive or send video data
"MODULE_NOT_FOUND"
can anyone fix mine
yes
Loading 13 commands...
1: clear.js loaded!
/home/runner/MusicBot/global/functions.js:16
props.help.aliases.forEach(alias => {
^
TypeError: Cannot read property 'forEach' of undefined
at jsfiles.forEach (/home/runner/MusicBot/global/functions.js:16:32)
at Array.forEach (<anonymous>)
at fs.readdir (/home/runner/MusicBot/global/functions.js:12:17)
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
the property doesnt exist or isnt an array
and you just could do on the command handle if (cmd.getcmd(name.includes(arg0))
thx
and is there templates, or do i have to like set every pixel?^^
sure but the xpbar is dynamical
ok thx
There are fill options
that's canvas
but there's other packages you could use
which may be better
don't know
i see, so i gotta do it by myself. i was wondering if theres templeas in the form of code where i could only set like rank.xpprogress = '33%',rank.image = 'http..' and i could choose from different templates how to render it.
Well
I don't think canvas has that by default
But it seems pretty simply to make a function like that
So perhaps someone has already done that
In a different package that uses canvas as dependency
sure its simply to make a functionf or that for 1 template,. but not 20 different to try out.
why people use wordpress and not always do from scratch... same reason 😉
Well
@everyone is there any jda host [paid-free] anything
Especially if it's your own function
You can simply use variables for everything you may want to change
Meaning you can very easily try out different things
You just have to get the base running
How i can add commands?
@mint storm no. there are java hosts and vpses/vdses that supports java, example: amazon aws (low ping to disc)
still it wont exists on that directory
you called the bot file app.js ?
And are attempting to run it with bot.js?
use node app.js instead

"Meaning you can very easily try out different things"
Thats nit the case because design is not that simple. if you want different designs it is not useful to put it into variables. The computer cannot automatically know what margin looks good on the human eye if i put the xp bar vertical, where to place the image best when the bar is vertical/horizontal. Theres too much possibilities.
@late hill
I see
Basically you want someone to do the design for you
Or give you some options to pick from
yes, like wordpress does for website creation
is there a way to get whoever added the bot to the guild with discord.js?
@mint storm JDA is Java, you probably need a VPS where you can install and use Java
How do you let your bot send custom emojis?
what lib lol
Discord.js
Is someone here literate in JavaScript and python and could translate something for me
poop
Well its this
let statuses = [
["LISTENING", "${totalMembers().toLocaleString()} users"],
["WATCHING", "${djs.guilds.size.toLocaleString()} servers"]
], num = 0;
setInterval(() => {
if (!djs.status) {
djs.user.setActivity(eval(`\`${statuses[num][1]}\``), { type: statuses[num][0] });
num++;
if (num === statuses.length) num = 0;
}
}, 1000 * 10);
Its to make bot status switch between servers, members and prefix
I cant figure out how to do it and cant find anything online about it
i had a friend give me the source for their bot @cobalt ridge but its in java and my bot @fringe jungle is in python
poop
How do you let your bot send custom emojis with Discord.js?
bruh
<:emoji:id>
<:emoji:id>
Iirc
doesnt work.
You might have put a space between the emote and the ID
if it is an animated emoji then it is <a:emoji:id>
Hm Im not able to use animated emojis, and does the emoji have to be in the discord server for it to work?
the bot has to be in a server with the emoji
doesnt need to be the server where the message came from
Thanks
you don't need to have nitro for the bot to use animated emojis
bots can always use animated emojis
^
hey sometimes messages the bot sees doesnt get cached, is this just me or
hi y'all jda is being a fucker rn, i can't log in to discord because i never get confirmation in the console
i recently updated a bunch of packages and built it, and it should work but doesn't for some reason
is this a library bug? jda patch version 100 was recently released so idk lmao
Maybe look on the JDA discord to see if there are more reports, if no one is complaining then I think the library is fine
@grizzled raven you'll have to fetch it
no like in general
wdym
not after restart
it only caches online users iirc
your bot not caching messages even just as they are sent

ok so
i checked a guild that my bot is in and i mapped all the channels's messages, and all of them were ```js
Collection [Map] {}
meaning no messages in that channel were getting cached even after messages were sent
that was the case for all channels except a few
is this because too many messages are cached on the bot?
-bots @mint storm
ok
What`s wrong with that? ```js
module.exports.run = async (bot, message, args) =>{
if(message.content === "#test") return;
message.react("🗻");
}
This user has no bots





