#development
1 messages · Page 390 of 1
v
if(message.author.bot) {
return;
}
cuz i dont want bots to be able to use the command
s
yes .author.bot is good
The json is sent from webhook on upvote, right!?
I didn't receive it though when a friend upvoted
The webhook test worked though
hmm
Language!?
Try checking out Flask
wat lang is ur bot?
Java
channels send like <#channelid>
Mh, haven't done regex in a while actually
so u can just remove the <# and the >
no
[#development](/guild/264445053596991498/channel/272764566411149314/)
send dat in chat
<#[.+>
or something like that
Aw, it removed the \'s
Well, the . is "any character"
and .+ any character n times but at least 1
cant u do .substring()? in java
¯_(ツ)_/¯
What you also could do is (.Net equivalent)
string[] words = string.Split(' ', message) and then find the ones starting with <# and ending with > and try to Parse them to an existing channel in your guild.
cant u find channels with ids?
Yes
¯_(ツ)_/¯
same xD i just havent touch java for 2 years
I mean almost the same thing, except you also Parse by name
so new to materialize and its pretty nice
Does anyone know a nsfw and hentai api?
@edgy needle find a website that has those things and look up "[website] api"
there are dozens
Then you are not searching good enough
@edgy needle pornhub. . .
just try to use an nsfw command in the nsfw testing and see wat they use
{"file":"https://purr.objects-us-west-1.dream.io/i/13444283_10153573665666516_637228041_n.jpg"}
Dude, either you rephrase your problem or you read
Because right now I have no idea what your actual problem is
i need a site like http://aws.random.cat/meow but for hentai and nsfw
i dont think they will work
but ima try em
Not really, but there are so many people asking the same simple questions every day again
ikr
Which could 90% of the time be resolved by actually researching. That's one of the greatest skills of a good dev and yet.. ah
I will just stop ranting and go shopping. 😐
When I was 14 or so and started developing I learned everything by researching
never asked someone else except I really was stuck for a while
few minutes
:triggered:
Well
this might just be the wrong community for me overall then 🤔
or at least the dev channel
if you're annoyed by people asking very googleable questions, yes, this is not the right place for you
Development related tho
this is development-related talk @earnest phoenix
check the channel topic
How do I make my bot play a youtube video
Depends on the library..
I came on this
Because that's how I play gifs
but video is then picture
So I tried video
Do you want it to send the audio into a voice channel or
That's what I meant
Just post the link?
Yea
I dont get what youre having trouble with
How do I make it post the link when I do %AfroCat?
😶
Like message.channel.send("link")
How do you determine what video to send
My question is: why is my bot not getting popularity?
Well, what can your bot do? Why should I have it?
my bot is in 23 servers, I think yours is probably in more 😛
It's in 12
No
its called patience
What is intense moderation?
It's meant to do moderation and stop
oh
Okay, that is pretty cool. Unfortunately there are very popular bots that do this already.
You need to do something unique, something that makes you different, while being at least on the same standard they are.
yee boi
That's what I'm trying
Find issues with other bots and dont have them in yours
well most people wants more than only moderation in a bot..
And this can take time. But not only that, you also need to have some skill in bringing your product to the end user. Make it descriptive, catchy, make them want to try it.
Then it will spread 😛
Use other bots and see what they lack in their features
I am
like dyno
Can you post me your DBL link?
@slow fable
This maybe
That's fine, second..
xD
Uhm, no offense, but you should work on your picture
I think its -botinfo
Often people just look at something like that and already say "well.. probably not that good"
I can't make anything good with my software/skills
saem
My next question would be, in your pictures is a non english footer, why is that?
Because it's a translation of my private bot
oof
Well, make it english.
Seems so
"settings system is a bit rough, but the bot should run smoothly" that's not very good advertising
Kinda scares people away that would otherwise try it
But I can't even lie
@steel tinsel You are not lying if you don't mention it. Next thing please god don't have a unique prefix for each command.
?
"MoonlightBot has an unique prefix for most tasks."
It only has one prefix
Kinda sounds like multiple prefixes
Yea im with Brian
Well, to round it up I would describe more what makes your bot special. Right now you only say.. well it has moderation features. But most bots have these.
I'll reorganize the description when I get my pc

?
so I'm trying to make a bot for a server I'm in and I can't find many tutorials for stuff
I have the bot ready
and I can do simple commands
but can someone explain how to do stuff like role or user specific commands
I'm using the java Maven JDA
you'll want Member#getRoles() and User#getIdLong()
so once I have someone's role how do I use it in something like an if() statement to make it so that only someone with that role/name can use the command?
if(member.getRoles().stream().anyMatch(r->r.getName().equals("the role name you want"))) {
}
thanks
in discord.js what is used to see which role mentioned role is for the bot? 
best way to test send message permission on jda?
@earnest phoenix what
@torpid frost Member#hasPermission(Channel, Permission...)
thx
you could do Mod
like mentioning
mentioning the role would change it to an id
mm
let roletogive = message.guild.roles.find('name', roleName)
if (!roletogive) return message.channel.send("Role may not exist make sure you spell it exact")
message.guild.member(user.id).addRole(roletogive);```
is what i do for giverole
well I fixed so it works to type the id only or the name of the role, but on a server they have emojis and stuff and its needed to @ sometimes and they mostly use @
hmm
Oh
Is there someone who uses glitch.com to host their bots?
ive set up a bot for someone on glitch before
Can check out: https://anidiots.guide/other-guides/hosting-on-glitchcom.html which is helpful for knowing how to host on glitch
I wanted to use the url of my bot (https://1-pupbot.glitch.me) as his website, like a lot of people do but it does not work...
i put this into the main .js file:
var express = require('express');
var app = express();
app.use(express.static('public'));
app.get("/", function (request, response) {
console.log(Date.now() + " Ping Received");
response.sendFile(__dirname + '/views/index.html');
});
and I tested that website on another server where it works...
try editing your package.json
add a new start
like "start": "node bot.js", "start": "node website.js"
that's not how json works
plus i have both the bot and this code in server.js
What code is in your node website.js?
Hmm
having repeated keys is undefined behaviour
some parsers might consider it an error, some (like JSON.parse) will use the last value, etc
SQL !== JSON
No matter what I do... I already got that code I posted here from the officiall glitch forum it just does not work...
Every time the same two errors... either 504 Gateway Time-out or the generric check your code message...
Because it is free and I am a poor student...
and I want the website hosted on the same place where the bot is...
@nimble merlin How can it be against copyright to use their Emojis in your commands?
because legal reasons
But he never actually copies them or such alike, right? I always thought these Emojis belong to Discord..
inb4 discord tos allows it
Mh, interesting. I'd think so
Alrighty
Considering Discord allows using emotes from other servers.......
could express npm cooperate with apache 
Unless you upload the emote yourself I doubt you can get in trouble then
\👑
As long as it's directly from this server's emote list (global emotes)
You could always use that 
Since Discord has a license to use the emote and they specifically allow the usage of global emotes from other servers I doubt you can get into legal trouble for using it as long as the emote is directly embeded from this server such that you did !dblSupporter
for example
In other words, don't upload it to your own server and use that emote ID use it from here
wot
No permission to use external emotes...?
check for user id...?
why
@earnest phoenix what do you mean
anyone here knows how to disable command not found error for certain guilds? discord.py rewrite branch
are these emojis created and copyrighted by dbl?
Most likely
@bot.event
async def on_command_error(ctx, e):
try:
if isinstance(e, commands.CommandNotFound):
await ctx.send("command not found")
elif isinstance(e, commands.NotOwner):
await ctx.send("you can not use this commands you are not the owner of CookieBot")
elif isinstance(e, commands.MissingPermissions):
await ctx.send("I do not have the permissions to do that")
elif isinstance(e, commands.BotMissingPermissions):
await ctx.send("I do not have the permissions to do that")
elif isinstance(e, commands.CheckFailure):
await ctx.send("An error has occored while trying to perform this command")
elif isinstance(e, commands.BadArgument):
await ctx.send("you have gave me a bad argument")
except Exception as e:
print(e)``` this is what i have how would i disable them for this guild only?
or find this guild id and do a check for the guild the message come from
in jda is not member.haspermission(Permission.ADMINISTRATOR)?
or as i've done in mine the owner sets a list of roles that are "modroles"
is that what you asked?
(ps sorry for my bad english)
the emoji is a server emoji or a default one?
so if a user have not the nitro he cant use emojis from other server also in theyr nickname
you should add the same emoji in every server you want to show it
yes but not on a user nickname
where the emoji might be shown?
oh embedded?
embed*
soo... idk how it works but if i remember right external emojis have a different syntax than guild ones
if you use embeded you could directly set a image next to the user line in embed
you'll need a bit ofbtests
yeah
that's right
imma see a sec
you know emoji id?
you tryed to use it instead chat syntax
nono i understood
the emoji is now show out of the server the emoji is created right?
nono that was not what i meant
but yes i've not understood the problem is bot not adding it or emoji that is written as chat text?
well you use a database?
lel what api do you use?
i'm good whit sql
you should use something to interface whit discord
i mean : what language you use?
mmm ok
you have a server/VPS where you host the mysql daemon?
so you tried where to connect?
nope mysql is a server - client database
try for sqllite so
it's a file based database
you'll have to create a *.db file in a folder near your app
and connect to it using proper driver
as i see on google sqlite is easy to use in python
once you set it up mention me if you need help on SLQ queryes and commands 😬
uh k well if you want only local
try creating a list of user id that in your server have that role
then once your bot receives the command compare ids from that list
if the bot crashes all will be loose but you could always recreate it
how on earth do we get the emotes id's
won't work in other servers :c (just side note)
as i said it works only on the server that owns the emoji 😅
the bot can send it if they have external emoji permission
Bots have global emotions
wew
Unless you as a user without nitro is sending it, then it won't work.
so bots is like having nitro stuff?
kewl
I just tried it and it worked fine and i do not have nitro
mm?
I used a test command with my test bot and it send an emoji from my server on another server that did not have that emote and it sent it without issues
in fact the server i used the command in have no custom emotes
Because bots have global emotes lol
I only have global access to emotes from 4 servers
@abstract aspen avatar @topaz fjord
well bots dont have access to every emote only the emotes that the bot is in lol
So uh, my bot @supple marlin
The user count is 6440
The amount in this server is 13355+
The code I had is client.users.size
6440 is likely the amount of cached users
there is nothing to fix, that's the "proper" value
Fuck mate
(discord.js) how would i ban a user using their username?
uh, well why not mention em
i have that done, also id but i would like to use username as well
oc
oh well use like args.slice(1) or whatever it is you do I forgot and then blah blah
i have that, just need to find the user
ooh
client.users.get(dingus).ban or somethin
naw
not right
dats wrong
message.guild.client.users.get(dingus).ban maybe?
naw
i dont kno xd
🤔


there are good youtube tutorials
sometimes
not the best tho
uh idk
anyone have any success checkmark gifs
Depends on your personality
I learn best by watching someone do it and try to replicate on my own for example
anything I stumble across then I'm going to research
Never touched Js
😅
Probably not that hard when you've already done something else so
most likely you will have trouble with syntax and its weird comparisons
like ===
or let and var
Probably just flying over this and see what you struggle with
or what is new
Express is definitely what you want to use as a beginner, but Koa is an underrated alternative, although slightly more advanced
Yeah, if you're starting out, Express will be easier to understand.
Middleware is one of the things that you really should grasp for JS, and Express is good at teaching you that
Oh you can definitely use Express if you're proficient too
Well, before you get proficient you have to be a noob 😛
it's incredibly widely used
Well, you will know something
you just need to start tbh
@uncut slate Since you are there right now, man am I excited to get the bot declined 😂
Which bot? 👀
Animus, but whatever. No pressure. Will the botpage be deleted when it is declined?
I might want to do a backup of that then
Yes I know, the next days.
It will be, yes
But I want to know if something like that is even wanted
Alrighty, quickly backing that up then. I liked how the text turned out.
Yea, it took me quite a while to get a base to work with
Uhm, let me see..
Mh, probably something basic
Originally I wanted to spent the week implementing various data collection things, but before I spent time on that I wanted to have all the basic features you would expect done.
Moderation, Google Search in case a phrase isn't understood and more error handling.
That would be an option
That's where data collection comes in
I'd simply make statistics and look through some phrases it often seemed to miss. That's probably the one with the least coding work but most manual search.
Sure, but that is a lot of work
You still need some sort of data set to work with
So you'd need to feed it n number of phrases from the personality you want to create
other than that I can only think of "pseudo" personalities
Need to research that
But I guess you mean something like there is a dataset the bot can use and it will just randomly build a sentence together based on predefined parts
I think with my current knowledge and experience that will take way too long to develop
And I don't have the datasets for such things
Well, the data needs to have some minimum amount of quality
of course you could just take all messages from a random person here and put them in the AI
but don't expect the outcome to be great then
You would still need to kind of normalize the data btw.
In the end you want to have something like magicAi.GenerateAnswer(MyIntentionAsString)
which means you have to somehow map some the data to the intentions
Which probably isn't even the right way to tackle this at all, but how else are you gonna tell your AI later what you want from it?
At that point it might just be easier to write like 10 variants for each message in your bot and pick one at random
Neither is there in preparing a dataset with thousands of sentences 😐
But well, there are probably other approaches to such a problem I can't think about right now
Don't say that, it's a good idea
It would be very nice to have the feeling to talk to a human and not a bot. That's a very nice motivation.
Uhm, yea, I agree Wordpress is not particular nice to work with
But for a lot of people with a low budget perfect
I'd even consider myself just taking some template and inserting some text. I simply don't have the time to work on the bot, website and uni.
You dont need a website
to accept webhooks
its not
Just run an http server
accept post requests that have the auth key you inserted into your dbl webhook, then take the user ID from the post data and insert it into whereever you put your upvoter IDs
y r u using wordpress
Ok so where are you storing upvoters
what kind of database
Ok what lang are u using
errr for upvote getter
Just use node
it's very easy
Probably only a few lines 👀
it will only be a few lines ye
I mean a simple webserver can be just ```js
const express = require('express')
const app = express()
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(3000, () => console.log('Example app listening on port 3000!'))
(hint: I think someone opensourced his stuff that does exactly that)
except instead of app.get
you do ```js
app.post("/dblwebhook (or whatever you want to name it)", (req, res) => {
// yada yada yada
})
and then you just do a simple auth header check
just an if statement
and then you insert the user data from the object given
into ur db
wdym front end
U use javscript
instead of php
it's well worth it
but with that you dont need any front end
to get an upvote webhook server
He wants to get rid of wordpress, nothing to do with the webhook thingy
I swear, the best advice you've ever gotten is to just start
You can just look through several articles
Well that's just some guy writing an article
Keep in mind that you won't learn it from this blog post
Good night
Why is it gray?
@static oasis Probably commented out
oof
Brian you genius
is dblstatslk a good command name for a command that looks up a bot's stats on dbl?
no
bot.loop.close(status_task())
TypeError: close() takes 1 positional argument but 2 were given
oof
Yeah, I found an error in my bot running.
its back now
online
it was really weird
@bot.command()
@commands.is_owner()
async def loop_start(ctx):
bot.loop.create_task(status_task())
await ctx.send("Status loop Enabled")
@bot.command()
@commands.is_owner()
async def loop_stop(ctx):
bot.loop.close(status_task())
await ctx.send("Ststus loop Disabled")
@bot.event
async def status_task():
while True:
await bot.change_presence(game=discord.Game(name="Being Coded"))
await asyncio.sleep(15)
await bot.change_presence(game=discord.Game(name="use C!help for command list"))
await asyncio.sleep(15)```
how would I fix the loop_stop command?
ping me if you think you know how to fix
lol
@bitter sundial also, you mentioned "why does netflix use nodejs". I know someone who knows a netflix lead architect. They use it for streaming aka heavy io, what node was designed for.
Has anyone sucessfully get discord-oauth2-example working?
Linux nice 😃
did you add the redirect uri to the bot app page?
This is for a personal site
again, did you add the redirect uri to the bot app page?
Yes
https://discordapp.com/oauth2/authorize?response_type=code&client_id=274620011744854029&redirect_uri=http%3A%2F%2Falicebot.pw%2Fme&scope=identify&state=HiVsDW64re7UUSmGpWZGCMl8twlUly
ah ok
tfw half the bots have dashboards now
ikr
Still seems blank
https://discordapp.com/oauth2/authorize?response_type=code&client_id=274620011744854029&redirect_uri=http%3A%2F%2Falicebot.pw%2Fportal&scope=identify&state=l1vA2VtFcWWlV3sAs9PwCXtqMPCsmQ
🤔
did you add the right uri to the bot app page (including http/https and path) and save it?
hv u added https://alicebot.pw to. . . the discordapp.com/developers/ ya....
ok
{
"connections": {
"code": 0,
"message": "401: Unauthorized"
},
"guilds": {
"code": 0,
"message": "401: Unauthorized"
},
"user": {
"code": 0,
"message": "401: Unauthorized"
}
}
hmm
why is it still unauthorized after i completed the login
¯_(ツ)_/¯
i dont understand py 😦
callback
thought so
that was my problem
it works
Thanks so much for y'all help!
How's my homepage!? http://alicebot.pw/
oh
need to update the headers
@floral stone change Portal -> Login
Why?
blank how
Portal is like 2010 shit
I like portal
Personal preference cant bother xD ¯_(ツ)_/¯
anything else?
the desc and image in embed?
fixed
it's cached
discord.py rewrite branch how would i make my bot show how many users the bot can see?
ok thanks I find it easier to ask here then to spend hours trying to make it work with the online docs lol
Use ctrl+f or the sidebar to navigate
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: object of type 'generator' has no len()
await ctx.send("I can see {} users".format(len(self.bot.get_all_members())))```
await ctx.send("I can see {} users".format(len(list(self.bot.get_all_members()))))
Convert it to list
and is there an easy way to make a restart command so i dont need to keep restarting the bot every time?
I have my bot running with upstart
It restarts automatically
It's been like that for years, I got the guide from somewhere. I think it's red docs.
or u can use PM2
pm2 for python 
and also im having issues with how to stop a loop after it started
you use break
pm2 can be used for more then python
while True:
if something == something:
break```
it will break out of the loop and go to whatever is enxt
@bot.command()
@commands.is_owner()
async def loop_stop(ctx):
bot.loop.close(status_task())
await ctx.send("Ststus loop Disabled")```
so its not possable from a command like this?
@bot.command()
@commands.is_owner()
async def loop_start(ctx):
bot.loop.create_task(status_task())
await ctx.send("Ststus loop enabled")```
this works fine but the stop one not working
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: close() takes 1 positional argument but 2 were given error given from console
@floral stone thanks for the help on my users command
First, it should be self.bot (You are using the command wrapper, right). Second, I haven't messed with running background loops but try looking into using asyncio. Finally, if you have any questions about the discord py api or python in general, feel free to dm me.
Also, maybe this might help: https://stackoverflow.com/questions/26270681/can-an-asyncio-event-loop-run-in-the-background-without-suspending-the-python-in
The documentation for asyncio gives two examples for how to print "Hello World" every two seconds:
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio-hello-world-callback
https://docs.
@loud bear
i, looking at the pages now
In all discord langs,
Sending an image is the same of sending a gif in embeds
discord lang
you guys know how i would use express to link with uh nginx for the webhooks?
I have no idea how to put variables in this code:
const unifiedCrawler = require('appstore-playstore-crawler-api');
unifiedCrawler.apple.getSearchResult('Uber', '1').then( result =>
//here
)```
My goal is to put the results in an embed like this:
```js
const unifiedCrawler = require('appstore-playstore-crawler-api');
unifiedCrawler.apple.getSearchResult('Uber', '1').then( result =>
var embed = new Discord.RichEmbed()
.addField("Name:", result[0].title)
.setThumbnail(result[0].icon) //etc
;
)```
But I always get errors such like:
```SyntaxError: Unexpected token var```
Also, if doesent work either.
Node.js / discord.js
I tried making the result to be a function like:
const unifiedCrawler = require('appstore-playstore-crawler-api');
unifiedCrawler.apple.getSearchResult('Uber', '1'), function(result) {
//code
}```
But, doesent work.
Please help.
Hello
can i save the script for my bot
im using Visual Studio
and im upgrading to Microsoft Visual Studio Professional 2017
and i even save my scripts
or remake
dm me
if u know
Why doesn't this work? ```python
purge command
@bot.command(pass_context=True)
@commands.has_permissions(administrator=True, manage_messages=True)
async def purge(ctx, amount):
await bot.purge_from(ctx.message.channel, limit=amount)
I'm getting the error https://josh.ate-a-ta.co/b3668a74.png
Can someone help me with looping all users?
Am trying to make a membercount that shows all users, all online users, all dnd, ....
like the membercount is done
just not the status section
( Language = JavaScript )
Why doesn't this work, again.
# cat command
@bot.command(pass_context=True)
async def cat(ctx):
"""Purrr."""
embed = discord.Embed(title="Meow!", description=" ",
color=0x146aeb)
embed.set_thumbnail(url="http://aws.random.cat/meow")
await bot.say(embed=embed)
- if you don't want to specify the description, then don't add that parameter
- is
random.catsuppose to be a site or an API?
Probably returns a random cat image
The link I used is an API.
but you aren't really doing the API call... you just literally provided a link to that site, and it's what it tries to do
Gives this when you load the link, or something similar {"file":"https:\/\/purr.objects-us-west-1.dream.io\/i\/xmas-just-in-time.jpg"}
You need to use aiohttp to get the json from the site and then the url.
@gilded thunder
Found another API.
ok
Lmao
If I have a regular expression that's
Hello my name is [a-zA-Z]```
what's the best way to replace the [a-zA-Z] with something in Java/JVM? What about having multiple names?
Hello my name is (\S+)(\s+\S+)*```
Your regex currently only describes a lower case a-z and then an uppercase A-Z
actually that one is just a single letter
Like you consume any HTTP Rest API? 🙃
Finally added a proper read me https://github.com/NekoTony/dbots-webhooks-py
dbots-webhooks-py - Just an example for using webhooks for DiscordBots.org.
How Is it
don't like it
it stores data in json files
and you still have to read them
meh
I could use mysql but I don't have the time
it's there for people in case someone needs it
one idea would be an implementation with ngrok or sth
for the db, use sqlite
simple and no conf needed for the end user
xd
i'm working on my own lib
nice
language?
py
nice
just have to find some easy to use dynamic url websockets or sth
fun fact: docs
The token of my bot changes every time I do refresh the page, as a result of which I can not run my bot, I tried to create a new token manually, and it still keeps changing
it says "This token changes on page refresh and is valid unless manually regenerated below."
all the tokens generated are valid
they only get invalidated when you click on reset
you... run it?
just use any of the tokens
@nimble merlin if you want to add a role to a user on guild join then use on_member_join event, it takes a member object and that's all you need
member
if it's a guild it's a member
yes
why do you want a role id?
ok
this is still async right?
pulls out async docs
it's definitelly not the way you did it
in order to assign a role, you first need to get the role, luckily discord.py has a built-in function for that
you need to use discord.utils to find the role, and then assign the found role
@bot.event
async def on_member_join(member):
role = discord.utils.get(ctx.message.server.roles, name = 'Members')
await bot.add_roles(member, role)
member.server.roles
¯_(ツ)_/¯
Can someone help me. I tryed to host my bot on Heroku but this error gets up:
Error: Cannot find module 'Discord.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/app/index.js:1:79)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Is it smart to start running my bot on heroku?
no you'd rather get a VPS
but if you have no pocket money to invest into VPS, its better than selfhosting
ok
invalid json
?
your config is corrupted
show the JSON code
{
"token": "XXX"
"prefix": "»"
"owner": "Astora#7539"
}
missing commas
^
there was commas and it just complained
I removed em thinking they mihgt be the issue
just make sure that there is commas after token and prefix
there's witht eh commas
uhh your token
well done
might want to reset that
show the config code without the token
{
"token": "NDI4MNDI4MNDI4MNDI4MNDI4MNDI4M",
"prefix": "»",
"owner": "Astora#7539"
}
hmm
Putting your ownername in config instead of getting it automatically and then your discrim/name changes
¯_(ツ)_/¯
userid is better
Yeah
not gonna change my name
if I do, future me doesn't deserve to use the bot.
no 
Ok then thats a deal

yeah but somebody else could change their name and discrim to that
No changing your name or you delete your bot
so id is better

someone could take my id too
no
No IDs are unique
no they can't change it either
they can
and they have no reason to
@earnest phoenix (((they have no reason to)))
@earnest phoenix You seem to know alot about the inside job of Discord are you a spy 
Oh god
(((if they stole anything it would be @gilded plank token)))
They will change it, we know nothing. Go ahead and make a fool out of your code.
Good luck!
»Implying I'm not joking
I'd tell you to go ahead and make a fool of yourself but you already did.
atleast look for a tutorial for something that simple before asking us
yeah I did
hmm I'd say you are making a fool of yourself with that flopped comeback 
literally copypasted that from the tutorial when it first went to shit to make sure it wasn't the problem
copypasta
wow 10/10
I was being sarcastic ya thot
jokes on you I barely understood what you said
Original code > copypasta
anyday^
Jokes on you, you barely understood anything I said.
copypasting code > refusing to copy and paste code when things go wrong just to make sure that that file isn't the issue
Copypasta isn't a bad thing, it's just original code is better.
I have been doing original shit when I think of it
tbh he is on about config.json but still original code > copypasta
but I'm using this tutorial to learn the ins and outs, and straying too far from the guide too early on makes later parts incompatible
»deleted all my config files
»made config.json again
»it works
the fuck
un-customized powershell with that bright ass blue 
yes
builder, you almost had me
get a better terminal
boi
powershell > cmd
you right click on the window thingy and click properties to change the color 
its beautiful
terminal > powershell || cmd
^
They all do the same shit tbh but terminal ssh is the best
terminal > cmd > powershell
terminal 
consolas or lucida console ofr typeface?
lul
fuck it, consolas
lucida is too wide
gotta make me my own typeface, I hate them all
okie dokie
Lmao windows
np 
@floral stone font =/= typeface
print("whatever")```
hmm I wonder if I can customize my VSC terminal font, or theme font in the theme settings 
@trim plinth you can
wew
The first for sure. You can then change the editor font
@floral stone can you name the languaghe?
Regardless of theme
@earnest phoenix thats python
no its not
not js
looks like lua
nope
no I'm talking about the code snippet you did
I'll do more and tell me what you think it is
Thats not ternary
thonkers
anyways I'm re-learning Java again, hopefully I'll actually remember how to use it
ok™
not really the appropriate channel 👀
sorry was just typing something here then it happnened
goot
can someone help me with picking a random image from a folder?
i mean, i write "fly random ship" and it sends a random ship pic
(from a folder)
math.random
Math.random and Math.floor
myVar[Math.floor(Math.random() * myVar.length))];
const myVar = require('./folder/file.json');
you would do it above the Math.floor or it'll return undefined
Wait was I actually close to correct?
@vital lark can u explain please?
maybe 
i need to create an array of images?
yes
yes
maybe
Shitpost you weebs if you gonna do that
fs
You should know how to make an array
Learn how 2 think
im new to js, so sorry, i dont know
This isnt a js specific problem
g00gel "how to get all files in directory" js
learn js before making a js bot™
You think abour how you would deal with the problem step by step, and then you google how to do each step
if i asked for halp it means i dont know
Ifyou cant find an answer to a step, then it hasnt been broken down enough
That requires they understand the concept of problem solving
[
"myimage"
]
const myVar = require('./folder/file.json'); // folder is the folder and file is your file
console.log(`${myVar[Math.floor(Math.random() * myVar.length)]}`);
augu ya spoonfeed
oof thats in a json file
no u
he wanted all files out of a directory
@earnest phoenix then deduce how to
Why's that matter
Irrelevant
^
We're helping you to help yourseld
@earnest phoenix august just gave you the code, how do you still not understand
thatss a nice solution, thx
So you require less spoonfeeding in the future
The rules even state we don't spoonfeed
catch a fish for a man, he will have fish for a day
If we just throw you the code, you wont learn too well
teach a man to fish, he will have fish for the rest of his life
Each of those steps should be easily googlable
#memes-and-media kthx
GOOGLE UP
@vital lark leave
@vital lark no u
Cant tell if taxi is being sarcastic rn
be nice
Your problem broken down:

Get a list of all images in a folder
Choose a random element of the list
Success
Then further break down those problems
in 99% of cases you should be googling it
if you don't find an answer ask somewhere
i have that even in a notebook already
somebody, somewhere has had the same issue as you
listen to what they are saying and maybe you'll get the answer with the help of your friend google 
You have what in a notebook
the solution
🤔
for dumbs: block scheme
just a question, why are you making a js bot if you don't know js well enough 
^
no it isn't
so i make XD
It isnt reeally
for me it is
Clearly not?
.-.
JS may be easy but you can't run straight into it if you have no idea what you are doing
Making a bot is a lot harder than you think
if i say it is you dont have to add things to what i said
It looks simple when you just have a few servers with simple ping pong style commands
because all programming language can have different structures
What has languages got to do with it
for example 12+12 in binary and in trinary numeric system is different
my point is that a solution for a problem may be the same but the sintaxis is different
**NOW U GET IT???**
Anyone else not get what hes saying here and how it's relevant?
stop exposing me to others
🤔 🤔 🤔
analise it by urself
Wheeze
If youre having issues getting a random image from a folder, but dont have issues making a moderately complex bot
You got a problem
for correcting my grammar .-.
if you dont have the capability to accept that its not ur problem, then dont get inside it
i dont need


