#development
1 messages Β· Page 590 of 1
I'm too good for python, I use the vastly superior php /s
oh no^^
Sorry guys
Interesting, a bot that runs code?
i thought of php ^^
you can do and in php?
Huh.. TIL
lol imagine a programming language that doesn't support barebones logical operations
how's that a bash if it exists in php (and any other language) 
I imagine if that were to be true, PHP would be a language that didnt π
I've been a PHP dev for 3 years and you just taught me something new, also it was kinda an obvious statement, all languages should (and probs do) implement it
Anyone know why my bot works perfectly on one server, but on another a cog fails loading
discord is going fucky-wucky rn
so i should just wait
"Im the smartest programmer that's ever lived i was chosen by god to make his temple, and i was given divine intellect"
wrong channel but sick dude
Anyone know a good tutorial or guide for making a bot respond to commands when you send them to it in DMs?
if (msg.channel.type == "dm"){}
i want to make a prefix like word command args instead of !command args
prefix = "nice"
bot = commands.Bot(command_prefix=prefix)
atleast for py
ot just bot = commands.Bot(command_prefix="jan")
like i've tried doing certain things to make it work ie: adding a space before the prefix in json and adding a space towards the msg.content check in the index but it doesn't seem to be working
how do you set a prefix in json
i might just try rewriting in in discordia or discord.net because javascript is my worst nightmare
lmao
good luck!
so having issues with dashboard | im trying only to make a user to send a bot and bot only . and if they try a user ID it returns error
so far i have this
if (client.fetchUser(req.body.botsID))
req.body.botsID = ID input , any help will be greatly appreciated .
what's the error?
no errors
so user.id just returns a success message
oh
dont mind that part
just trying to make
error message
if they enter user ID
check if the fetched user is a bot
if you want it to return if it's a bot yes
I think fetchUser has that anyways
lemme check
if its a bot return success
if not bot return error
i tried lots of ways
but none seem to work.
if req.body.botsID is actually a bot id, that will return
you'll also need to await it as it's a promise
This basically just means if bot then return
ill remove
or did you mean the promise part
How do I make it so my bot shows how many servers its in on the website?
webhook i think
send a post request to the api with the server count
what lang?
discord.js
https://discordbots.org/api/docs
there should be a js wrapper on here
What menu do I go to
it should be on the left
like this?
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your discordbots.org token', client);
// Optional events
dbl.on('posted', () => {
console.log('Server count posted!');
})
dbl.on('error', e => {
console.log(`Oops! ${e}`);
})
sure
setTimeout(function() {
resolve('foo');
}, 300);
});
promise1.then(function(value) {
console.log(value);
// expected output: "foo"
});
console.log(promise1);
// expected output: [object Promise]
try it
did you install dblapi.js through npm?
Oh ok
you could just do a simple POST request to the api if you don't want to use the wrapper
somebody is having issues trying fetch any discord invite link?
idk
https://discordbots.org/api/docs#bots
if you scroll down, you'll see the endpoint to post server count
you could use that instead of the wrapper
I currently have this to check a if a parameter was added to a command ```js
if (args[0] === '-l' || args[0] === 'list') {
withList(m, args[1], client, ops);
}
I want to be able to specify the rest of the array of arguments instead of just the second object somewhat like this ```js
withList(m, args['1 and up'], client, ops);
That worked. Thanks
what's the 12.0.0-dev version of mutedRole = message.guild.createRole({ name: "Muted", color: "#000000", permissions:[] });
?
Can't seem to find it in docs on mobile
This is discord.js right?
yep
Because I don't even see 12.0.0-dev as an option on there
well I know it's message.guild.roles.create
but I can't figure out how to make it work from there
message.guild.roles.create({
wait
oof
message.guild.roles.create({
data: {
name:
color:
}
reason:
});
how can i create embed pages in java script :/
xd
Is there a way to fetch a message by id and delete it?
that's actually exactly how you do it
Mmh
I don't know exactly, but I'll find it and dm it to you @empty owl if you still need it
thanks and yes
Wait
idk
What language
discord.js
either way, there must be something in the discord.js docs, look somewhere under text channels I assume
I'm python
ok
@amber fractal can u help me>?\
TypeError: channel.fetchMessage is not a function
channel needs to be a TextChannel
@bot.command()
async def divide(ctx, num:int,*, num2:int):
embed = discord.Embed(title = f'''{num} / {num2}=''', colour=discord.Colour.gold(), description = num / num2)
await ctx.send(embed=embed)
anyone know why this wont work
i can't seem to find it
In embed.description: Could not interpret "1.5" as string.```
do i need to format it or something?
yep
thanks!
I don't now why my script is very slow
what do you mean slow? like it doesn't react to messages very fast?
You ask for help a lot god we canβt solve everything for you
Domains are much easier to type in and look way better
But both work
Well that could be your own network being slow or something just a lot happening before it sends the response message
How to make my bot send messages saying what servers it has joined/left.
and how many servers it is in?
Listen for guildCreate / guildDelete events
Amount is something like client.guilds.size
Depends on your library
@minor kelp always say the lib and version when asking a coding question
rtfm
How to make my bot send messages saying what servers it has joined/left.
and how many servers it is in?
D.py
Rewrite:v1.0.0a
u wot m8
read the fucking manual
shut the fuck up
@west skiff
return await ctx.send("STFU... ||https://www.youtube.com/watch?v=OLpeX4RRo28||")
Is what i used
oh I was thinking it was a manual embed for some reason
lol no
So
Lets say i have a value in a js file, that i require in file2
If i edit the value of the variable in file1, will file2 automatically use the new value?
stop asking to be spoon fed
google it
if you do it again i'll be muting you https://personal.space.lol/GM2Fj
then learn how to code and debug your code
if you are genuinely confused and you absolutely can't find anything on google whatsoever then try asking better questions than "Help plz" with a terrible screenshot that does not explain your issue whatsoever
if we could find the issue with just that image, then surely you could figure it out with whatever braincells you do have
if you're just writing "help plz" in google, obviously you're not going to find any results
EDIT: The messages above were for @pallid zinc, seems like he didn't like being told to stop so he deleted his messages.
xd
hey guys somebody can help me
its a stupid ask but
how to make a bot to update some part of the code for example every 5 minutes
in js
Where do you host The bot? @silent cloud
how do i remove an application from a team in discord developer portal @modern sable
answer coming right up
wdym
i've never used the teams feature but theres this so https://luca.is-inside.me/iTnBgqQS.png
yeah you cant do that currently
because thats what they said when they added the feature
smh, why would they add that and not add a remove from team button
heruko bad
yes
https://glitch.com is better
tho shuts off after like 5 min
^
Can sound like a dumb question but why can I not send an embed using a webhook? How does it work?
embed=Discord.Embed(title='', description='', color=0x(colorvalue))
await client.send_message(webhook.channel, embed=embed)
?
ive never tried webhooks
@silent cloud so use an database
Or fs
But idk if fs work on heroku
I use vpn and glitch
@west spoke what you need?
It does not work like client.send.message @west spoke
So lol?
it depends on if you use rewrite or not
@formal agate that it just how to create one
look at part 2 then
i dont need any help
@gleaming glen good one
None of them have that
I already have a webhook created @earnest phoenix, I just need to send an embed with it. This one is not for that i suppose
already checked that
Token and the id is set up and sending a normal message works
Ok im gonna ask a really dumb question here but im trying to figure out if there is an other item in the map but i cannot get it to work no matter what I do. Here's the code in context now so hopefully you can tell me because idk what I'm doing wrong.
items.shift;
if (items.length > 0) {
//random code here
}```
thought so
When you have body on webhook
xd
var status = new Discord.WebhookClient(ayarlar.statusHookid, ayarlar.statusHooktoken)
status.send("something here")
``` this works.
Paste:
{
"embeds": [
ooof
I do not have a body
There you paste it
Where 
not works either
Hnmm
So
Idk webhooks using code
But you need json
So when you send an message you need json too? @gleaming glen
No I don't, the one that I posted above works
webhook.send('This is an embed', { embeds: [{ thumbnail: { url: 'attachment://file.jpg' } }], files: [{ attachment: 'entire/path/to/file.jpg', name: 'file.jpg' }] }) .then(console.log) .catch(console.error);
@gleaming glen
Thank you 
anyone here can teach me how to run my bot 24/7?
buy a vps
if not here where do i ask
this channel has a few paid hosters in the pinned messages
no
there is free hosting but it's quite shit and not made for discord bots
primarily for websites
ok then how could i aply my bot if im away mainly and its offline when it gets checked
why don't you run it on your computer with a raspberry pi
but how i can do that with glitch.com?
@silent cloud databasr
hey
do not use a free hosting
okay, a vps is 2 euros a month, just don't go to starbucks for a day
π
an alternative is to get a part time job
i give up on trying these stuff
@silent cloud i need to make a hello-vps-pls-get
and ^ no
the best way is to use like mongo db
how do u delete a message by id
To keep your bot on Glitch.com online 24/7
Use uptimerobot to ping the bot every 5 minutes
Far as I know The Kepler Bot stays online because of that
or an ever better solution: buy an actual vps. theyre cheap and definitely worth it
my only excuse for using glitch was not having a reason to buy a vps, as it probably isnt worth it if its just a small private bot. but now that i have actual projects to host, i bought a vps
huh
Well if my bot grows a little too big I'll switch to something else
Glitch.com only has 200MB (far as I know)
And I've already conqured 20KB with my data from users.
i only hosted private bots on it, so i didnt care much
@rugged linden hey i watched one of your vids.your a cool youtuber
uh thanks
hey guys
what i need to do if i have this in logs
(node:3958) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit
hmm
OH GOD
I've never seen that before
pure horror right here
so lets get this straight
this is what you are doing for commands
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
client.on('message', message => {
//some code
})
which is bad practice
dont do that
instead, this is what you should be doing
ohhh
client.on('message', message => {
//some code
//some more code
//even more code
})```
you dont need a different event listener for every command
yw
hm
i don't understand
if my bot dont do anything 12 hours he go offline?
or what?
My bot is flickering on and off and I cant find out why
Is AWS having issues right now or is it something else?
its discord.js
can send error
Under
?
Can u design me nav bar pls
Thats the problem

tons of templates, search one you like and copy it if you can't be arsed to do it yourself, as simple as that
#socialexperiment
You cant just fucking ask for someone to do free work for you then if shit doesnt go your way say "social experiment" bro thats not how it works
@gritty bolt send your json file
Chill
I dont have a file for it
I'm receiving it
From a web server
I can get the response it sends
I know
Its coming from a file that doesnt even exist
I get like three throw errors and then that
would you mind pasting the entire error log into a pastebin or something
would probably be more helpful than small portions of it
you need use msg.user.addRole
@gritty bolt 1.) you're missing an event listener for "error"
2.) you're getting an api error for missing permission -> you're trying to access discord data/make requests you have no access to
3.)the data you're trying to parse is either not even json or invalid (json objects don't start with <)
ok question
i keep getting this error in my console
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x058AEB70>
thanks
i mean, i've never used aiohttp but if it says unclosed session you might wanna close it at some point
whoever said about glitch.com i wish him best of best
@umbral tusk what
i made my bot automated so itll never shut down,someone mentioned the site glitch.com and i tried and success
Nice
i can
I have too
its disgusting but it works
i need to him never down
uhm can i post a link here by chance?
i think yes
actually ill dm you
LOL ez
its not as hard as i thought at first
Why??
rule number 4 #rules-and-info
do not use free hosting for the hundreth time
for the 500th time, google and amazon exists
Can anyone make me a discord bot for free?
No
that's not how this works
@burnt canyon why you need it?
I need it because I want a bot that is unique to my server. Thereβs also different commands I would like on it including a command where it sends a message to a specific channel
I could go more in depth if you want to move to dms
there's a magical platform called github where developers host their code if they feel like being generous
search something that fits your needs
if it doesn't exist create it yourself
How
Yea but hard to understand
Practice makes perfect
Whatβs to pratice if Iβm clueless
Well you are clueless because you haven't tried
what language
Java
please look up learning to code
Js
made a shit input command
if you give up after five lines i wouldn't really call it trying tbqh
agreed
Anidiotsguide is helpful
system.println("gay")
I think
isnt that java
I followed a guide and I did everything it said and it didnβt work everything was incorrect
then you did something wrong
following a bot making guide isn't learning the language
no
not if the guide was trash/outdated
yesd
There isnβt bots with customization with logos and stuff
I would want a custom logo
learn to code
making a bot is merely a normal project, it's expected of you to know the language you're working with
Well I donβt know shit
too bad
^
anidiotsguide is not really helpful to getting started with coding
that's to get started making a bot
if you don't want to spend time learning, pay someone to do it for you
just go read the entire discord.py docs
Gard for the love of god learn to code properly
he's using js @cold harness
How much would I have to give for any of you make me a bot for me
he isn't using anything he asked for a free bot
oh well same thing but read the entire discord.js docs
this discord is not a freelance recruitment heaven
just please go look up how to code
You guys are experienced
that and stop forcing the guy to learn if he doesn't want to
BECAUSE WE PRACTISED
it's like forcing a baker to be a mechanic
we can't spoonfeed
NOBODY CAN DO SHIT WELL WITHOUT PRACTISE
stop being annoying
haha ^
stop splitting your messages into ten thousand parts and keep your cool
remember kids, caps on the internet is cool and brings your point across
tl;dr if you don't wanna learn pay up (but not here), you don't get things thrown at you for free
if we did you wouldn't learn anything out of it
if the guy doesn't want to learn, he doesn't want to, he can pay someone to do it for him however this is not the place for to find a freelancer, instead of shouting and forcing someone to do something they don't want to do, redirect them or leave the chat
yeet
I want a customized one
Lol
Donβt say make one
Gard you need to learn how to code please
@fiery stream Don't advertise
aren't there bots you can download and like self host?
@unique nimbus stfu
you don't even know what features he wants
no
jazz
Gard please don't swear, getting yeeted with code won't teach you anything
Sup
you said you were giving him the code right?
What if I donβt want to learn
Yea
then download a bot from the website
Why did they nick me
i mean make a bot join
Thats not how my name is supposed to he
because your username is cancer
^
Shut up stop being toxic
what lol
that's literally the reason though
Jazz dms
Its because it goes to the top of the screen
What ever
your username is annoying and can't be mentioned easily so the mods nicked you
yes
yeet
how hard can it be to not throw a contextless "yeet" into a channel every two minutes
50/50
Someone give code
lmao
yw that'll be 30 usd
if i were to code a bot for you, i would need $20
but no i don't code bots for others
what? that doesn't sound right that is so much
^
The median annual salary of JavaScript developers in the U.S. is $98,000.
according to this: https://www.codementor.io/freelance-rates/javascript-developers
idk how accurate it is, but its an article from 2019
js is in very high demand recently because of its flexibility and portability, thanks to node.js
I donβt doubt it being that high in the US
but does it say that hourly pay is that high worldwide?
canβt check link atm
yeah thats where it says
i want to have that job
still, you can probably find asian developers charging $1-5/hr
tru
trying to code a bot atm I put my past behind me π
going to make a simple one then add commands π
cool
learn the language you're working with, do not faceplant into bot deving
im going to buy stopbeingabad.dev just for purposes like this
oh good tim's on
making a bot is the same as making software, its meant for programmers
if you are not interested in programming, i suggest you try using discord bot maker
how do i make it so the bot joins the channel when i do -airhorn then plays airhorn sound then leaves
@client.command(pass_context=True)
async def join(ctx):
channel = ctx.message.author.voice.voice_channel
await client.join_voice_channel(channel)
play sound here unsure how
await asyncio.sleep(3)
voice_client = client.voice_client_in(server)
await voice_client.disconnect()
I get cringy when a see the word "programmers", especially when the same programmer calls themself like that
But it's more forgiving and a good learning environment@quartz kindle
@quartz kindle how much do python developers get paid? per hour
ah cool
easy and portable languages are in high demand, because they increase productivity, you can do more in less time
and with less headache
and javascript specially, because its highly compatibly with networking, and everyone wants everything connected these days
internet of things
javascript is basically the only language that can run as a desktop app, a phone app, and a website app all using the same code, without compatibility layers
with just minor changes and tweaks
like discord itself, you can use the app, or the website, its the same code
java comes close, but it needs java installed in your machine (and constantly suffers from security flaws)
anyone know a good coding app where I can polace codes and shi
polace codes and shi?
place codes and shit
place what codes
smh
mkdir my-bot
cd my-bot
npm init -y # generates you a minimal package.json file
oh nodejs
yeah
just node or something else
cause this thing im reading says I should also use yarn or npm
use npm
how do i download it?
node.js is a program that runs javascript code
if you install node.js, it comes with npm
npm is node package manager, it manages and installs node.js packages
oh rly when I installed it did not
nvm I dumb
thanks
where would I post my library
npm or node
both node and npm are command line tools, you have to open a command prompt window (cmd), navigate to the directory you installed node, and run node or npm
what?
this: mkdir my-bot
cd my-bot
npm init -y # generates you a minimal package.json file
are you on windows or linux?
windows
no don't use mkdir
whats the thing for windows?
you can just right click and create a folder somewhere
in...
wherever you want to work on
k
wherever you want your bot to be installed in
on in files?
talk in english please
so if you open a command line (cmd)
you can type "cd C:/yourfolder" for example
my b talk in idot languarge
yea
you have to open it and use it
yes
open cmd, and type "cd yourfolderpathhere"
your folder path meaning the folder you want to work on, the folder you created
where did you create the folder?
in files
in documents
you need the full path
k
if you put it in documents, it will be something like "C:/users/yourusername/documents/files/yourfoldername"
but there is an easier way
open the folder you want to work on, hold the shift key, and right click
you will see an option "open command prompt here"
shit key
ik lol
you need to hold the shift key when you right click
only says power shell
should I delete powershell
\Users\gavga\OneDrive\Documents\Llama Lounge Bot>
no don't
would this be correctr: \Users\gavga\OneDrive\Documents\Llama Lounge Bot
The Windows 10 Creators Update ditches Command Prompt as Windows 10βs default command shell and replaces it with Windows PowerShell. In an attempt to provide all Windows 10 users with the absolute best command line experience, Microsoft has replaced Command Prompt with Wind...
yes, it looks correct. you need to get cmd to find it
win + r
like this:
your cmd needs to say the full path of the folder
so you know its working in the correct folder
after you find the folder, type npm --v to see if its working
if everything is correct, you should see something like this (the version number of your npm):
then you can start installing npm packages
hold up
I just replaced powershell with command
then when i do Shift + right click it dont come up
try restarting your computer, or you're right clicking the wrong thing, you have to right click an empty area inside the folder
there are plenty of guides on the internet too, try researching a bit on basic node.js guides. i need to go to sleep, good luck!
`events.js:188
throw err;
^
Error: Unhandled "error" event. ([object Object])
at Client.emit (events.js:186:19)
at WebSocketConnection.onError (/home/ubuntu/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
at WebSocket.onError (/home/ubuntu/node_modules/ws/lib/event-target.js:128:16)
at emitOne (events.js:116:13)
at WebSocket.emit (events.js:211:7)
at _receiver.cleanup (/home/ubuntu/node_modules/ws/lib/websocket.js:211:14)
at Receiver.cleanup (/home/ubuntu/node_modules/ws/lib/receiver.js:557:13)
at WebSocket.finalize (/home/ubuntu/node_modules/ws/lib/websocket.js:206:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
events.js:188
throw err;
^`
How do I fix this error?
client.on("error", do something)
what are some helpful languages for making code blocks look nice, specifically stuff like ```md
- foo (bar)
- two (yes)```
wghat
I remember seeing a list of them somewhere but idk where
the one I'm thinking of makes the numbers red I think and the parenthesis blue
ohhhh
you mean
if(msg.content === 'foo')
msg.channel.send('bar!')
i saw that too
i'm not sure about the two and the yes though
or maybe i saw it as async msg or something else
function i mean
thanks
foo and bar are usually placeholders
I want to be able to delete a message if the collector doesn't receive anything in 30 seconds. After 30 seconds are up the collector returns an empty array, but it doesn't seem to want to run anything after that
const input = await m.channel.awaitMessages(filter, { max: 1, time: 30000, errors: ['time'] });
if (!input) return msg.delete();
And I do have msg defined elsewhere and it does delete the message for other options
Trying it out
That will only work if it returns an empty array, I thought collectors returned collections
Hmm. That didn't work either actually
It seems to just stop entirely if it doesn't collect anything
what
no I was talking about literal code blocks @grim aspen
also I figured it out, I'm using md
oh
1. Song name <channel>
2. Song 2 <channel 2>```
Apparently this has no good async support for errors
what lib?
djs
oh ok idk anything about that
@amber fractal For whatever reason, if you add the errors: parameter to it, it causes the code to completely halt
I thought it just provided a simple reason for the error, but the more you know
wait I'm an idiot
put it in a try catch
the catch will be the timeout
delete in there
I believe that should work
Anyone know how to make a bot respond to commands when you send them to it in DMs? I use discord.js
Really? I should test that. Thank you
I'll keep this one simple msg.react('1οΈβ£'); doesn't work and I'm trying to get the 1β£ reaction to appear. It keeps telling me it's an unknown emoji
np
um. collected. () does nothing
If collected is a function then you want to do await collected()
This worked for me
No idea why yours says unknown emoji
doing ':one:' causes it to say it's unknown as well
well that isnt an emoji resolvable
1β£
that's what you have in there?
that's what's on my clipboard
weird
Hold up
I got different outputs using ' and "
but they still both worked
Nvm my bot was just being dumb
There has to be some other identifier for them
I'll try using my eval and see what it outputs as the input
Oh. Yeah. It works on that...
Hmm
it seems like 1οΈβ£ doesn't work, you have to use # + β£ for it to recognize what you are trying to send
but if you copy that box and type a number and then paste the box it seems to work fine
I'm still confused
As to why it's not working
Doing 1β£ with the eval worked
I had msg defined as await createList() which returns message.channel.send(), and it works for deleting but wont add the damn reaction
Hmm I checked and removed the DM commands donβt work here thing and my bot still wonβt respond to commands sent to it in DMs. Any fixes?
Yo
Have anyone used auth0 strategy before
Its kinda really hard
I mean not hard but confusing
Does anyone know the Trello api here?
I'm struggling with Custom Fields
@slim heart i think i used it hefore
Im trying to update a custom field like so
t.makeRequest("put", "/1/card/" + te + "/customField/5c93081b6f265a8b62226f90/item", {idValue: "5c93081b6f265a8b62226f90", value: {"text": "test"}}, a)
(te being the card id, everything about the id's etc. are correct)
but for some reason it keeps saying Invalid custom field item value
@fiery stream
anyone familiar with C
void something(char **aVar)
How do i hand a 2 char array into this?
char x[2][1] = {{"a"}, {"a"}};
something(x);
Is wrong i can already tell so what do i do without changing function arg
guys
one man say me about add file watch.json in my bot
what is does this code i dont understand?
https://m.youtube.com/watch?v=xX4AcRFojk4 watch this @silent cloud
Welcome back to another amazing viewer request episode, this time you guys have been asking about how to host your bot on glitch.com. So, watch the video and...
@silent cloud it make refresh your bot when something will change
@silent cloud that json file is just giving instructions to glitch
please help with auth0
@fiery stream just post your question or issue
What to help
@fiery stream yes, what to help?
Nope, aby you need it?
Yep really badly
Does anyone know how to setup your bot to use the discordbots api in discord.py rewrite
Use in what way?
Read the docs
to add voting support
i did read the docs
i used the example but pip fails to install and gives me an error when i nstall it
What
how do i use the webhooks
Generally webhooks are part of webservers, but you can Google what webhooks are
For Python, you can use Flask
webhooks are basically server where you do post / get request from
And for node.js
How can I change this: https://discordbots.org/bot/520489179940126725. to this: https://discordbots.org/bot/kuraimika?
I just saw a lot of bots whose link was changed
it's called getting a certification
Umm
Iβm having issues with a command. I recently added a command that allows me to change the prefix for the bot on a server, but for some reason, it takes like 5 uses of the command before it actually does anything. Any help? (Iβm using discord.js)
we dont magically see your code
lol Iβll send it one second
const fs = require("fs");
module.exports.run = async (bot, message, args) => {
if (!message.member.missingPermissions(`ADMINISTRATOR`)) return message.reply("Only Administrators have this ability.")
if(!args[0] || args[0 == "help"]) return message.reply("Usage: !prefix <desired prefix here>")
let prefixes = JSON.parse(fs.readFileSync("./prefixes.json", "utf8"));
prefixes[message.guild.id] = {
prefixes: args[0]
};
fs.writeFile("./prefixes.json", JSON.stringify(prefixes), (err) => {
if (err) console.log(err)
});
let sEmbed = new Discord.RichEmbed()
.setColor("#FF9900")
.setTitle("Prefix Set!")
.setDescription(`Set to ${args[0]}`);
message.channel.send(sEmbed);
}
module.exports.help = {
name: "prefix"
}```
@grizzled spruce where do you host your bot?
means it wont wait for the prefix to actually write before you can use it
Ah
well at the first place
you shoudnt really use a json storage in a public bot
if you dont know how to use a database, use enmap
or keyv
they do the db writes for you
you just need to know how a javascript map works
Sorry not this
Yes...?
enmap is really simple
so if you are worried about it making hard
thats isnt a thing to worry about
Ok
Lemme checkkkkk
Lemme see message.js event code
As it appears I donβt even have a message.js
Iβm sorry could you be a bit simpler? Iβm still trash at all the terms
Yes
in simple terms how you did do it?
Thats all good but your prefix code was so complexly coded
I used terminal to load discord.js and then added .js and .json flies to build the bot
I mean it was weird way
It was based off of a tutorial
I donβt...
then its time for you to learn them
discord.js uses maps a lot
collection is a map
Ok
Would discord.js.org have anything on that
I do
thats a map
on pulling a guild data, what do you do?
use .get()
enmap works like that
but ofc you need to set a setting inside of it first
so use .set(guild_id, { prefix: someprefix })
https://enmap.evie.codes/examples/settings just refer here if you want to know more about how it works
its really easy and I dont think you would have problems on it
Ok
Lol
Thank you
Its easy i can walk u through
Nah thatβs ok
@sinful lotus yoo
?
Umm have u used auth0
@fiery stream what is that for?
Web
Lol
Please help
What language @fiery stream
Javascript
Mmh I'm of no help then
Python non-rewrite
Off
xd
Stalk?
I don't get what you mean by "stalking" in this case
All I see is literally just getting Instagram pfp
Yes, only pfp
Thats the thing u supposed to get full pfp
xd
Hi,
I'm trying to make my bot react with the emoji 1β£ , but if I use \1β£, it says 'unknown emoji'
I've tried copying the ID but doesnt seem to work either
unicode emojis dont have ids
that emoji is consisted of two different ones which is why escaping it doesn't work
combine digit 1 and enclosing keycap into one
hmm
Yeah no idea how to solve it yet
i literally said above how to lol
What do you mean by combine both of them



