#development
1 messages · Page 531 of 1
I started learning NodeJS in high school to make webapps for clubs and shit
just learning REST and sessions and authentication and stuff. good times
i made a note taking app that i used for the entire year, only for me to lose the encryption key at the end
sad
idk even know why i started coding in general
i started coding because my dad said "hey want a book on javascript"
i started learning node when i was introduced to bot making though
my early code was shit
same
I wanted to make a badass website
I learned Python to do game dev but ironically all my game projects have been making physics engines for HTML5
my solution to getting all the letters lol
code: "xl"
})```
i never thought i would become a programmer, until i became one
computercraft
@quartz kindle Same
i considered myself a script kiddie for the longest time though
mainly from hearing all the "front-end not real derv" stuff.
imagine telling that to a kid in middle school
i started with html, and years later i find out i actually hate front end
@quartz kindle hey! i got the gcp account so where do i start lol. i’m assuming the computing engine.
yup
Yeah, client side is a nightmare for me
it's fun to design stuff but it always gets messy, even with jade or coffeescript or whatever
i'm still a pleb with low level stuff but at least i know the best practices
i hate designing in general because im never satisfied with my own designs lmao
client side is hell
for real
client side js is fun, but coding UIs is a pain
it's fun designing little pretty webapps and guis, but when you have to work on client side for a real application
yeesh
im still figuring out how im going to do this thing in my project
a fully customizable canvas app
with a shit ton of user-defined ways to draw on canvas
oof
canvas elements are WACK
and interactive canvas
xD
like
how do you even do responsive design with a canvas of fixed size
without horribly distorting the image
or without ugly af scrollbars
dont use canvases for images? lmao
well it was a whiteboard app, so no choice there
yeah that's what i ended up with
in one of my attempts i had a zoomable canvas by scrolling
with redrawing on finish
with a high-dpi canvas (double res)
thing destroyed my browser
5k x 5k = 1gb+ ram
i ended up completely dropping the zoom feature
discord.py - Is there a way to get information from the user and get arguments they pass from a command? For example...
@client.command(pass_context=True, no_pm=True)
async def addreaction(*args):
server_id = args.message.server.id
await client.say(args)
await client.say(args.message.content)``` I keep getting the error `AttributeError: 'tuple' object has no attribute 'message'`. How can I get the server ID and arguments the command runner passes with the command?
@quartz kindle sorry to bother again but you said i wanted to go with a micro server type correct?
awesome
thank you
it says 4.83 a month though
@quartz kindle does that 4.83 go into the 300 free credit
it says 4.83 but after you have it running it will say 0
oh cool
the 300 credit only lasts for 12 months, but until then everything goes into it
except the free things
the only problem is that google only gives you 1gb of bandwidth
and discord bots use much more than that
alright awesome, would linux be fine
and i’m not planning to use a music bot, just a bot for my server
so even with the free tier you're still gonna spend like 1 dollar / month from the free credit because of bandwidth
and after 12 months it will start charging that on the credit card
but its still the cheapest thing you'll ever find
oh okay
if you're up for it, you can also just create more accounts and sign up again
for another 12 months of free credit lol
and yeah linux is fine
im using ubuntu
@quartz kindle should i use the cloud “bucket” to transfer data or is there a better technique
oh okay
Hi, I don’t know where write this so I write here ( sorry for my English I’m Italian )
I search a bot for count whit a command send me the top 10 message with much reaction
What
Wait I use google translator xD
lmao
I'm looking for a bot that with a command tells me which are the 10 messages with the most reactions from users
@rocky mesa
not possible tbh
Rip
the api doesn't like caching messages
Maybe with logs_from?
what
You can get the logs with that method
what
where are you mentioning this from
discord.py (sorry for bringing this up multiple times, I didn't get an answer before) - Is there a way to get information from the user and get arguments they pass from a command? For example...
@client.command(pass_context=True, no_pm=True)
async def addreaction(*args):
server_id = args.message.server.id
await client.say(args)
await client.say(args.message.content)``` I keep getting the error `AttributeError: 'tuple' object has no attribute 'message'`. How can I get the server ID and arguments the command runner passes with the command?
which would spam discord and get you banned
yeah
I've set limits like 75k and there is no problem, even when repeating in a short time
wdym?
like if i set it to http://localhost/login?path=callback will i need to tell discord (in the dev settings) to use http://localhost/login or http://localhost/login?path=callback?
:v i keep getting ignored
It should look like async def addreaction(ctx, *args):, I think. Then you can access via ctx.message
I'll try
@sick cloud iirc they dont count
alright, thanks
@quartz kindle is it normal to be uploading like 3000 files lol
you're uploading 3k files?
if you're uploading lots of dependencies like node modules and such, then yeah its normal to have a lot of files
oh that might be it
@sick cloud you could encode the path into the state
you can zip them though
oh, thats alright
you don't need to upload node_modules
ok
you just need to upload package.json and package-lock.json/yarn.lock
besides your code
then you can install the dependencies on the other end with those files
which is usually way faster
hey thats alright, ill just wait like 10 minutes
if I want to ping a certain role, where can i fold the ID of the role
where can i find*
\<role>
\@Memes for example
ah i see
thank you
wait oof it doesnt work
do i have to put ${} around it (discord.js)
@vernal basin the role has to be pingable
ah i see
@quartz kindle sorry to bother but would you be able to help me transfer files from my windows machine to my linux gcp instance?
werent you already doing that?
i had something pop up and had to go
but ive looked around a bit and couldnt figure it out
i tried using the google bucket thing but that didnt go well lmao
you cant use teamviewer on a headless linux machine lmao
im just lost at this point lol
go to your compute engine instance, and open the ssh window
on the upper right corner, click the cog wheel, and click "download file"
then enter /home/username/.ssh/google_compute_engine
where username is home directory, which you can find if you run ls /home (usually something like email_gmail_com)
once the file is downloaded, use an ssh program like putty and use the downloaded file as the ssh key
~/.ssh
and connect via ip address
👀
yeah i just tired that but it requires the absolute file path
when i did
message.guild.createdAt
```I dont want the date to look like --> 2017-05-29T00:40:52.218Z
i wanted it to look like 2017-05-29 (time)
discord.js ^
message.guild.createdAt.toUTCString()
You could do that,
Or you can use Moment to get a even clearer response
using normal libs for external js smh
Yes
That code makes zero sense
Why would you be able to set the username of a collection of guilds
this.brain is not a function
brain inc stopped responding
Brain dead now
Unable to import module "brain"
Please keep it related to development and not start memeing around we have #memes-and-media for that
events.js:167
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:8080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
Emitted 'error' event at:
at LavalinkNode.node.on.error (D:\.Discord Bots\Brie-djs\node_modules\discord.js-lavalink\src\lib\PlayerManager.js:70:47)
at LavalinkNode.emit (events.js:182:13)
at LavalinkNode._error (D:\.Discord Bots\Brie-djs\node_modules\discord.js-lavalink\src\lib\LavalinkNode.js:226:14)
at WebSocket.emit (events.js:182:13)
at ClientRequest.req.on (D:\.Discord Bots\Brie-djs\node_modules\ws\lib\websocket.js:551:10)
at ClientRequest.emit (events.js:182:13)
at Socket.socketErrorListener (_http_client.js:391:9)
at Socket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Anyone knows what could be causing this? Might be stupid but i'm trying to use lavalink but i really don't know how the nodes work.
{ host: "localhost", port: 80, region: "asia", password: "##HIDDEN##" }
for the nodes
🤔
never used lavalink before so i have no clue
nvm i think i figured it out
nvm i can't figure it out .-.
Looks like it can't connect to your lavalink server
i don't get why tho, i followed the docs
econnrefused is annoyingly present in almost every nodejs host i've used
not just for discord but REST in general
if the error just started appearing without any changes in the code, you may just have to wait for a short time
@shadow barn try making sure your NodeJS is the latest version
How we can make permanent instant invites using bot? (Discord.js)

Hi
wew
Lol
that reminds me of windows 98
@earnest phoenix
I think this will benefit you :
client.on('guildMemberAdd', async member => {
if(!gt[member.guild.id]) gt[member.guild.id] = {};
/// if(!gt[member.guild.id]) gt[member.guild.id] = {rol: 0};
var Drole = gt[member.guild.id].rol;
var autoRole = member.guild.roles.find(r => r.name === gt[member.guild.id].rol)
if(!autoRole) return;
member.addRole(autoRole);
});```
who can help me here
@rich sail sure
im dm pls
@slate pilot k here you have dm unabled
I'm doing a play command, but when i select the video throw me that error:
handleVideo is not a function, i have the function handleVideo in another folder where are events, and the handleVideo.js code is:
https://hastebin.com/oqidabuhul.js
¿What i need to do? pls help
url doesn't work
let me do another
Who can help me
Well we can't see your code
@quartz kindle lock channel
What's a good but cheap VPS? My bot uses little resources so yea
DigitalOcean
hey can anyone help my bot dont work on this servers channels but works in all other servers ??
I'm guessing your bot is muted
no didnt doesnt has any mute role
Help
Hello !
I have a problem with my bot
My bot worked very well until tonight 18h
It makes a command out of 50 and starts once out of 10
Some are broken tho
No you'll just have to wait smh
@tight heath
Welcome to Discord's home for real-time and historical data on system performance.
Look api discord is on
can anyone help me with showing your bots server count on discordbots.org. in one word, i want to use servers api for site
@lofty hamlet it's down just believe me
@earnest phoenix #topgg-api's the place; check #312614469819826177 first
All Systems Operational
lets report
no need
they know it's down
literally scroll 20 messages
@lofty hamlet believe me now? https://cdn.discordapp.com/attachments/264445053596991498/519584633319587876/unknown.png
Yes i see
@eager kite everyone has that problem even me too because discord api down at the moment.
how would one deal with a bot that lags when responding to commands? it's using "forever" to run 24/7
I'm thinking it's 1 of 2 possibilities. either 1) it's the ec2 server I'm hosting it on; or 2) it's the thing keeping the bot constantly running
oh, so could that be what's causing my problem?
So far, everything's testing fine now for my bot. discord status says latency has been resolved. I'm just dumbfounded that it had to happen right as I was presenting my bot for a directed study (senior project in college)
like, it happened exactly when I didn't need it to.
so this isnt really a bot development related question, but does python have anything like json objects?
for example:
how would
const myobj = {
"coolproperty": null,
"hahayes": "hi"
}```
look like in python?
Dictionary literal
>>> d = {"A": "ALA", "C": "CYS", "D": "ASP"}
>>> print d["A"]
ALA
>>> ```
ah so the only different thing is how i refer to it
instead of d.A its d["A"]
big thanks
python just makes it more confusing
wait it does? never knew lol
i mean in python indentation is a serious factor, but yea
they don't have arrays
it some other fancy thing
all languages need to have obj[key]
otherwise how would you do js var x = "test" var obj = {"test":1} obj[x] //1 obj.x //undefined
true
if i have a link like https://youtube.com/channel/ThatTonybo, how do i slice the /channel out, so it becomes https://youtube.com/ThatTonybo?
You could just .replace('/channel', '')
that makes no sense
well thats whats happening 
Can someone help me? I can not download canvas and it tells me:
https://hastebin.com/zojiyakuwu.makefile
But I do not know how to solve it.
yes
yes but how should I install it?
npm install --global windows-build-tools
Thanks, I'm going to try.
I download windows-build-tools but it always shows me the same error 😐
which one?
this error ;
https://hastebin.com/zojiyakuwu.makefile
no python mmm
https://www.python.org/download/releases/2.7/ you can install it manually
Thank you for your help, but now that's what it shows me ...
https://hastebin.com/sokemufanu.makefile
This shows me the same error ...
how to make streaming bot status?
how to fix it? http://prntscr.com/lqrlh4
bot 1 have prefix n! and another have prefix x!
if(!<message>.content.startsWith(prefix)) return
you know in discord.js how you can make embeds?
can i make js let embed = new Discord.RichEmbed() a const?
Yes
const Discord = require("discord.js");
const ms = require("ms");
module.exports.run = async (bot, message, args) => {
console.log(`${message.member} ran the "GiveAway" command`);
var item = "";
var time;
var winnerCount
let messageArray = message.content.split(" ");
//-- f!giveaway 1(winnerCount) 60(seconds) Item Giveaway
for (var i = 3; i < messageArray.length; i++){
item += (messageArray[i] + " ");
}
winnerCount = Number(messageArray[1]);
time = Number(messageArray[2]);
var giveEmbed = new Discord.RichEmbed();
giveEmbed.setDescription(item);
var embedSent = await message.channel.send(giveEmbed);
embedSent.react("🎉");
setTimeout(function() {
var peopleReacted = embedSent.reactions.get("🎉").users;
var winners = [];
// Checks if fewer people reacted than the winnerCount allows users to win
if (peopleReacted.length >= winnerCount) {
winners = peopleReacted;
} else {
// Gets as many random users from the peopleReacted as winnerCount allows users to win
for (var i = 0; i < winnerCount; i++){
var index = Math.floor(Math.random() * peopleReacted.length);
winners.push(peopleReacted[index]);
// After adding a user to winners, remove that item from the array to prevent him from winning multiple times
peopleReacted.splice(index, 1);
}
}
var winnerMsg = "User(s) ";
for (var i = 0; i < winners.length; i++){
// Add each winner to the winnerMsg
winnerMsg += (winners[i].toString() + ", ");
}
var haveHas;
if (winners.length === 1){
haveHas = "has";
}
else {
haveHas = "have";
}
message.channel.send(`${winnerMsg} ${haveHas} won ${item}`);
}, time * 1000); //--conversting seconds into miliseconds
}
exports.conf = {
aliases: []
}
module.exports.help = {
name: "giveaway",
category: "other",
description: "",
usage: ""
}
var peopleReacted = embedSent.reactions.get("🎉").users;
TypeError: Cannot read property 'users' of undefined
A collection of reactions to this message, mapped by the reaction ID```
get(reactionID)
how do i just transfer any kind of fonting to normal letters?
you mean changing the font
For verification, should I have users do a recaptcha on a website or send an image in dms and have them type what the image says?
@earnest phoenix basically yeah. so like it tansfers from fonted text to normal text
@brittle nova it depends on what you want. i'd use recaptcha because it's all in one place instead of between discord and what not but also probably better protection and not to mention you dont have to do the whole image process
In discord.py, if I'm having the bot take arguments with a command, how do I get it to take emojis as a part of the arguments? If I type my command in Discord to the bot, with an emoji as an arg that I want it to take, it doesn't do anything; the command won't execute.
@slim heart the verification is to make sure users who join a discord server are actually human
why not just have them type something in a channel?
non-human accounts usually never type anything anyway
or type predefined content
you can also easily create a captcha in the channel itself, no need for dms
There are captcha npm packages
thats an accent
I've done that
but like theres a million fonts lol so i'm not gonna do it if i have to type them all out
I mean like finding what letter it actually is and coverting it to normal text
can you show an example?
just the normal utf or whatever it is
because fonted letters arent recognized by the code
Yes, but what font is that
thats not a font, its unicode characters
oh ok
he wants to convert all non-standard unicode to standard alphabetical
i dont think there is any way to do that besides what you're already doing
oh cool
mapping every single variant to a letter
you can find many attempts at doing this
for example https://stackoverflow.com/questions/286921/efficiently-replace-all-accented-characters-in-a-string
i dont need accented characters
yeah but the method is the same
the person who reported the problem gave me that site
well tbh just in general idek how fonts are registered
and im really not trying to type out every font in existence lol
what language are you using
@slim heart they do the same thing to convert normal text to "special" text
this is from their code
and again, its not fonts, its unicode characters
fonts would be changing from arial to times new roman or something
In discord.py, if I'm having the bot take arguments with a command, how do I get it to take custom emojis as a part of the arguments? If I type my command in Discord to the bot, with a custom emoji as an arg that I want it to take, it doesn't do anything; the command won't execute.
@quartz kindle Hey! Im back at it again but when i go to download the ssh it says no such file
hmm
what shows up if you type ls /home/email_gmail_com/.ssh?
using your account's email
@mild quarry wdym
@slim heart i gtg, but let's say that i'm making a command to echo whatever i say and i tell it to echo a custom emoji. it won't respond to that
Just search if the emoji exists in the server or maybe see if it starts with <: and ends in >
im not actually sure how python sees emojis i'd imagine the same
@quartz kindle nothing really happens
Ok
what if you type ls /home
my email name pops up
the same one you used on the previous command?
yup
then try this
go to your google console
and click this button on the top right corner
wait for it to connect
then run gcloud compute ssh my-app where my-app is the name of your project as it appears in your url and in the console itself
i got this 😦
alright, did it create the directory?
looks like it is doing it now
alright, in the end it should ask you for a password to protect the key, just enter whatever you wish to use as your password
hmm i got through that but it ended up saying couldn't fetch the resource
btw littlejj is the bot name and it is a very long story lol
actually im sorry, that is the vm instance name
ohhhh i mustve put the instance name not project name
yeah its project name
still popped up with the same error
i swear nothing ever works for me lmfao
wait, I may have found the problem
got it! i think it was the zone that was wrong
yup that seemed to have worked
identification saved in /home/.../.ssh?
i believe so
alright, so now try to download it again like before
so now when i do ls /home/.../.ssh, it pops up with "authorized_keys" but nothing says /home/.../.ssh/google_compute_engine isnt a valid file
ill go back to the cloudshell
if thats the name lol
only shows "authorized_keys"
go back to the shell and check where was the key saved lol
it should have someting like this
lmao
thank you so much for all the help
now try using an ssh/sftp program
does it have to be a .ppk
nah
it makes the windows ding as if an error but nothing pops up lol
i think i have to rename it tbh
whenever i go to click browse it shortens the file name
i can rename it, correct?
yeah i think
should i load the .pub or the other one?
i've never actually used putty, let me try
i got it working
the ip that is written in your google compute engine dashboard
next to the ssh button
says server refused that key
X_x
always a problem with me, im bad luck hahah
also got this
tried all the files, still didnt work
might have found the problem
i have to repaste a code in
you need puttygen
i have that
open puttygen and load the key in there
i just got the new key aswell
yup, it works
hmm mine didn't work
did you use puttygen?
yup
wait when i "login as" should i use jakegorrie3
i believe so yes
i see two ips when im in the vm instances page
damn, did everything but it still popped up with this
how would i be able to check that
the correct one has .ppk
is there any other programs i can use like putty?
do you think its my server or just putty
there is also winscp and filezilla for file transfers only
can someone give me a hand
here 🖐
well
Im working on a leveling system for my bot and when i run it, it works. But it keeps spamming the bot leveled up so i want to know how to a) make the bot not level up and b) make it stop spamming
the bot is tracking its own levels?
make it ignore bots
ok
but now my other problem
i dont know if its not traking xp
tracking
because all it sends is a level up message every single message'
how's your leveling logic?
@client.event
async def on_member_join(member):
with open('levels.json', 'r') as f:
users = json.load(f)
await update_data(users, member)
with open('levels.json', 'w') as f:
json.dump(users, f)
@client.event
async def on_message(message):
with open('levels.json', 'r') as f:
users = json.load(f)
await update_data(users, message.author)
await add_experience(users, message.author, 5)
await level_up(users, message.author, message.channel)
with open('levels.json', 'w') as f:
json.dump(users, f)
async def update_data(users, user):
if not user.id in users:
users[user.id] = {}
users[user.id]['experience'] = 0
users[user.id]['level'] = 1
async def add_experience(users, user, exp):
users[user.id]['experience'] += exp
async def level_up(users, user, channel):
experience = users[user.id]['experience']
lvl_start = users[user.id]['level']
lvl_end = int(experience ** 1/4)
if lvl_start < lvl_end:
await client.send_message(channel, '{} has leveled up to {}!'.format(user.mention, lvl_end))
users[user.id]['level'] = lvl_end```
i dont code in python, but if their operators are the same as in js, then lvl_start < lvl_end is the problem
it sends a level up message if level_start is smaller than level_end, which it always is
unless im reading it wrong
i dont know python
You'll probably also want to get a database involved
When you restart your bot, you'll lose all your data
hes using a json file
hey I want to learn html what kind of stuff would I need for that
like what editor should I use and how would I make a website
bai
@quartz kindle so i did further research and am praying this will work, https://gist.github.com/feczo/7282a6e00181fde4281b
In disocrd.js using npm package https://www.npmjs.com/package/imgur. I dout anyone can help me right away but im trying to use the npm package to pull images from imgur and post them as embeds. Code:
var imgur = require('imgur');
exports.run = async (client, message, args, setting) => {
var query = 'meme';
var optionalParams = {sort: 'top', dateRange: 'week', page: 1}
imgur.search(query, optionalParams)
.then(function(json) {
//console.log(json)
let imageURL = 'https://i.imgur.com/' + json.data.id + '.jpeg'
let memeEmbed = new Discord.RichEmbed()
.setTitle(json.data.title)
.setDescription(`[(link)](${json.data.link})`)
.setImage(imageURL)
.setAuthor("Imgur", "https://i.imgur.com/kpLlF3Y.jpg")
.addField("Upvotes", json.data.ups, true)
.addField("Downvotes", json.data.downs, true)
.setFooter(`Written by: ${json.data.account_url}`)
message.channel.send(memeEmbed);
})
.catch(function (err) {
console.error(err);
});
};
module.exports.config = {
command: "meme"
};
module.exports.help = {
name: "meme",
description: "Displays a random meme from ",
usage: "hb.meme"
}```
ill dm you part of the console if you want
Output:
@quartz kindle hey! i got on!
ayyy
dude im so happy rn
gg
yup
@formal agate what does console.log(json) show?
use pastebin or something
what exactly do i do now that im logged in? lol
well, there are two separate things
ssh and sftp
ssh is what you're doing right now, which allows you to run commands, install, etc in your server
sftp is what you need to transfer files but cannot run commands
putty is supposed to have an sftp client but i didnt manage to get it to work
you can try using filezilla, which is an ftp client that supports sftp
i would assume that is called psftp
yeah i tried using it but it didnt work lul
oh okay
i tested filezilla tho, and it works great
id suggest winscp + putty
winscp is also good yeah
since they both work together well
winscp costs ten dollars right?
no
winscp has putty support so it is easier to manage your connections
you can do stuff easier
seems legit
@formal agate json.data is an array
yea
do i just input my ip and user and password?
json.data: [
{id:etc},
{id:bla}]```
which means, you cannot do json.data.id
you have to do json.data[item].id
...
data contains many items
you can import sites from putty into winscp
how do i only output one?
and yea i was just about to say what tim said
oh word, i just imported my putty info
to get the first item just do json.data[0]
ok
why dont i see my user?
file perms?
hmm how would i change that
what if you type it directly in the address bar?
also, from that picture it looks like jake is a hidden folder?
tried that, it will show the location but not allow me to go there
it looks slightly less opaque lol
right click > proprieties?
yeah it will apply to all subfolders as well
oh makes sense
lol
lmso
i have 2.00
:))
alright so they all finished
do i just drag the folders into the other
if you're connected and see both local and remote files, yeah you can drag and drop between them
hmm seems like its gonna take a very long time
i think it is downloading node modules as well
then just reinstall on the server?
deleting files via sftp suffers from the same problem as transfering
it does it only one file at a time
lmao
alright my files moved over instantly without the node_modules
so now i have to reinstall the modules, do i just go into the server cmd and do npm install
in the putty cmd
you can do ls to view the current folder you're in
if you see your node files, proceed
i tried npm install but it says command not found
else do cd folder to navigate
ah you probably need to install node first
best way to do it is with nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
should i paste that in the console?
then nvm install node
yes
you might have to paste it with right click > paste
because ctrl-c and ctrl-v have other functions in an ssh connection
it is working
i am so happy rn
alright, it seems as if everything is installed
i get some errors but thats fine right?
what kind of errors?
yeah, it happened after npm install
is there another way to download it
try installing it separately
npm install lzma-native
or just remove it if you dont need it lol
i dont think i would need it
it might be a dependency of some other module
it said success while rebuilding it
but when i try npm install it comes back up with the error
does your bot need music?
not music but it reads a sound file and plays it
it seems to be a dependency of audio packages
can you try running the bot and see if its working?
try reinstalling sqlite3
if i remember correctly, npm install cancels on error, so it didnt finish installing all the packages
yeah
back to installing your packages one by one i guess
tried but same error pops up, ugh
with sqlite?
which error now?
same one lol
not lzma again no?
unfortunately it is
idk lol makes no sense
true
goodnight, i will try to figure it out later, the quest to put this up will continue tomorrow
Does anybody have the economy codes me and @haughty folio could use?
I'll make them when I get time
Ok
code it yourself
no spoon-feeding here
client.on('message', function () {
process.exit();
});
here economy code
if(command === "avatar"){
var member= message.mentions.members.first();
let embed = new Discord.RichEmbed()
.setImage(message.member.avatarURL)
.setColor(`RANDOM`)
message.channel.send(embed)
}
``` it works but the embed is blank. y?
so change the members part. ok ty
message.member.user.avatarURL
wait both of em
idk how to make it so if this person is mentioned, show there avatar. i only know how to get your own
so how do i do that?
For mine I did
let user = message.mentions.users.first() || message.author;
.setImage(user.avatarURL)
It's either user.avatarURL or user.displayAvatarURL
Can't remember it's been a while since I have touched a computer and coded
ok ty
Np
@earnest phoenix what library
Discord.JS
What do you have till now
Wdym?
Like how far are you
servers
No code wise. Like have you started or
Have you installed the dbl package
Not yet, whats it npm?
yeah npm i dblapi.js --save
Hey! i have a question how to enable something that is ''false'' like Welcome enable at tb!config how do i turn it to ''True''?
MySQL database or JSON files
To store information you can use a MySQL database or a Json file
like with what ''commnad'' do i turn it to ''true?''
What library
you mean code language
yes library
👏🏾
Maybe ask your friend to come here
i am unable to understand, i had a simple question how to turn something to ''true'' beacuse tb!set WelcomeEnabled 1 , tb!set WelcomeEnabled true , tb!set WelcomeEnabled + , tb!set WelcomeEnabled Positive all doesn't work
how do i turn it to ''true'' then???
no way to know without knowing how it was coded or without documentation
r/ihadastroke
In discord.py, I have a command that requires arguments from the user ( >[command] [args]) and if the args the user gives is a custom emote, the command doesn't execute and nothing happens. How can I get it to take a custom emote as an argument from the user?
@small python does this look like a support server for whatever that bot is

@small python you would want to run tb!set edit WelcomeEnabled true
if its /bot/turtlebot
then tb!set [value] [insert] Changes the bot's settings
but they dont have anything about WelcomeEnabled nor Welcome in their docs
Well it looks like they used the guidebot template
Hey so I’m having trouble with my little bot server thing lol. I’m currently using the site to make http requests to my bots local address which is masked by a sub domain of mine, besides the point. I tried to do everything through cloudflare but for some reason the entire origin ssl thing wasn’t working so I just got a certificate through LetsEncrypt ezpz. Then I ran into the problem anyone can trace back to my home IP address with that and to put it simply I’d like to avoid that lol. So I was still hooked through Cloudflares DNS servers so I decided to turn on http proxy and everything literally worked perfectly. Then, after a few minutes it wouldn’t respond at ALL, http https everything. So I turned it off and now it works 👌. But I’m still presented with the exposed IP problems. I’m just looking to see if anyone has any idea on a proxy I could use or even use my own domains? I have like 4 different domains hooked up to a cPanel so if I could do something there someone please inform me that.
Umm tb!set WelcomeEnabled true
Hey ^^ My message
oh ok.
nope won't work
Imma add it on my test and see
I’ve tried everything can’t figure it out
@small python I’ve gotten farther it is “tb!set welcome enabled True” it doesn’t like true or True
Thanks!
bro
i need with prefix ping pong code
i need this code for my command
message.channel.send(new Discord.RichEmbed().setDescription('Kahkaha Attin').setImage('Link'))
@earnest phoenix
burda nereye atıcam işte
noktalı
virgul
lemi
message
is
not
defined ?
bu hatayı aldım
This channel not allowed to speak turkish
@earnest phoenix set message to msg
İ have message is not defined error
i added link
Dm
Someone knows how to search for a message with his ID so he can edit it after.
bana
excuse me, in java, basic code, bot start correctly, but the msg isn't display:
@hushed berry helps please my bot is no works
import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent;
import net.dv8tion.jda.core.hooks.ListenerAdapter;
public class HiEvent extends ListenerAdapter {
public void onGuildMessageRecieve(GuildMessageReceivedEvent event){
String message = event.getMessage().getContentRaw();
if (message.equalsIgnoreCase("hello")){
event.getChannel().sendMessage("hi").queue;
}
}
}
- - - - - -
MAIN
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.JDABuilder;
public class bot {
public static void main(String args[]) throws Exception {
JDA jda = new JDABuilder("Token").build();
jda.addEventListener(new HiEvent());
}
}
yeah i do that before
No
but it's not workk too
Just do sendMessage(...).queue()
I don't see it in your code tho 
ok all is rectified
rectified?
well, all is good
Odd choice of words.
sorry
:p
i'm french
No, I don't lol
Ohh you do french at school ?
Yeah. #memes-and-media
Anyway, i don't see any error in my code
@earnest phoenix you're using a very old version of JDA
Are you using the version from maven central instead of j center by any chance?
so depenencies can come from different repositories
or jcenter
maven central is used most
there's a jda on maven central and jcenter
but the maven central one is really outdated
how i can get it and use it ?
search "add jcenter maven"
and thus the problem come of this ?
you need to use jda from jcenter
so i'm using jda of what ?
the jcenter repository
Okay so
You're using an old version
Which doesn't work
And the new update isn't on maven
But on gcenter
So you need to download it from there
what's the issue?
Why do you have an event listener in (what i assume is) a command
just use a reaction collector or whatever it's called
Anyone Can Help Me Discord.Js Sharding
props.settings.aliases.forEach(alias => {
client.aliases.set(props, props.settings.alias);
})
``` discord.js ^^^ Idk y it wont save the aliases
@earnest phoenix , sharding is only recommended for big bots for decreasing latency and i have a code for sharding. if you give me a command i give you the magical sharding code.
@visual zenith not enough information from that piece of code alone, but im assuming you want to save alias to client.aliases, if so just save alias, not props.settings.alias
also, you're setting an object as the key, just so you know (assuming client.aliases is a Map/collection)

?