#development
1 messages · Page 495 of 1
Hi,I have issue that my bot can't send message of stats cause its too big
And the stats are 1 per line
Is it possible to split per line?
if your message is over 2k characters i wouldn't
Dang
bc normal character limit is 2k and embed character limit is 1024
Oooh
Stats use embed
Got it
But is it possible to split message into 2 messages?
Or like,uh
what lib
idk c# so
Everything was okay before my bot joined this server xd
Too many stats
Wait
How to check how many chars string contains?
Nvm
I will do foreach loop until the message fits in
Like it will try to cut out every line fast
Until the message fits to 1024 char limit
Doesnt sound good to performance
But only solution
I mean the worst bit of performance with that would be waiting for the messages to actually send
Also don't foreach, use sub strings.
@woeful sparrow
hi i use discord.js and need to add a sever count that shows up on discordbotlist can someone send or help with the code for it
what
can someone send the code for a sever count i use discord.js
the code is literally on the API docs
can you send a link
oh ok sorry bother thx
Guess my links aren't good enough 😬
oof
An official module for interacting with the discordbots.org API - DiscordBotList/dblapi.js
?
🤔
What country u in
america
oh lol
i think i mis spelled that
Make sure you're not using a VPN/proxy that would break it
@inland latch is there an error?
yes
ImportError: cannot import name '_remove_dead_weakref'
and when i try to reinstall, dkpg wont let me
my bots are still running fine on some cached python until they reboot
help
@night imp @west raptor got it?
i updated it to 3.5.6 and then suddenly, everything is corrupted
@night imp you still here?
I've never seen that before @inland latch . Maybe you have to reboot? I would try asking on stack overflow they have a lot of python people
@earnest phoenix what is it?
@inland latch ex uninstall, reboot, install, reboot, Try it
@night imp am i allowed to invite bots to my server
i need to clear my general chat
Yeah of course
but dont know which one to use
Purgeing can only go back around 15 days iirc
thats fine by me
If you want to completely clear the chat I would remake the channel
Ok
There are lots of bots that do that
which one would you recommend
14 days*
Off the top of my head I think Dyno has a purge feature
dyno will do
@night imp want to go into dms?
https://goo.gl/yRwb0S
Dyno Discord Bot - Home
Dyno is a customizable Discord bot with music, moderation, auto roles, anti-spam/automod, and much more.
kk
@inland latch I'm sorry I don't use python primarily and won't be able to help you
i keep trying to log in with my other discord buuut it wont let me lmao
any suggestion
Private window?
LF> a bot that tracks how many images a user has posted, leaderboard style (similar to xp but with images)
ok?
no, I want a leaderboard, statistics type bot
similar to xp leaderboard but with images instead
¯_(ツ)_/¯
or embeds/videos/links
How do I make this function not shit?
_replace (content, find, replace, delimiter = '', findDelimiter = '') {
if (!Array.isArray(find)) find = [find]
let result = content
find.forEach(ref => {
result = result.split(findDelimiter).reduce((a, e) => a + delimiter + (this._reference[replace][this._reference[ref].indexOf(e)] || e), '')
})
return result
}```
ok
:P
async def ban(ctx, member: discord.Member = None):
author = ctx.message.author
channel = ctx.message.channel
if ctx.message.author.server_permissions.ban_members:
if member is None:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":confused: | Error", value="Please specify a user for me to ban!", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Kick Error")
await client.say(embed=embed)
else:
await client.ban(member)
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":thumbsup: | Banned User:", value=f"{member.mention}", inline=False)
embed.add_field(name="Banned By:", value=f"{author.mention}", inline=True)
embed.add_field(name="Banned In:", value=f"{channel.mention}", inline=True)
embed.set_footer(icon_url="https://https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Banned user")
await client.say(embed=embed)
else:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":rage: | Error", value="You do not have the right permission. Required Permissions for this is: **Ban Members**", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Ban Error")
await client.say(embed=embed)
No syntax highlighting 🤢
any ideas on why i type .ban (user) it dosent do anything?
what is syntax highlighting
@deep inlet
It's gross to look at if you don't use syntax highlighting
idk how to highlight
@client.command(pass_context=True)
async def ban(ctx, member: discord.Member = None):
author = ctx.message.author
channel = ctx.message.channel
if ctx.message.author.server_permissions.ban_members:
if member is None:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":confused: | Error", value="Please specify a user for me to ban!", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Kick Error")
await client.say(embed=embed)
else:
await client.ban(member)
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":thumbsup: | Banned User:", value=f"{member.mention}", inline=False)
embed.add_field(name="Banned By:", value=f"{author.mention}", inline=True)
embed.add_field(name="Banned In:", value=f"{channel.mention}", inline=True)
embed.set_footer(icon_url="https://https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Banned user")
await client.say(embed=embed)
else:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":rage: | Error", value="You do not have the right permission. Required Permissions for this is: **Ban Members**", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Ban Error")
await client.say(embed=embed)
```
Look how much nicer that is
how
wait
@client.command(pass_context=True)
async def ban(ctx, member: discord.Member = None):
author = ctx.message.author
channel = ctx.message.channel
if ctx.message.author.server_permissions.ban_members:
if member is None:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":confused: | Error", value="Please specify a user for me to ban!", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Kick Error")
await client.say(embed=embed)
else:
await client.ban(member)
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":thumbsup: | Banned User:", value=f"{member.mention}", inline=False)
embed.add_field(name="Banned By:", value=f"{author.mention}", inline=True)
embed.add_field(name="Banned In:", value=f"{channel.mention}", inline=True)
embed.set_footer(icon_url="https://https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Banned user")
await client.say(embed=embed)
else:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":rage: | Error", value="You do not have the right permission. Required Permissions for this is: **Ban Members**", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Ban Error")
await client.say(embed=embed)
OH
'here' + `is ${some}` + JS```
so can you help me
Anyone here good at Regex and unicode? I need help with removing "weird" symbols but keeping text such as Japanese, Greek, Hindu etc.
Something like this:
【Hello!】★ ああああ
I need it to output: Hello! ああああ
Yes
I think there's something in JS for this I forgot what
Give me a second
I can't remember
Shoot
I could have sworn I have seen a npm package for this before
Give me a second
YES
Yes?
I HATH FOUND
DOES THIS HELP YOU? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize

Let me test this
Nope, still returns weird strings
This wouldn't be a problem but it crashes my API when I use these strings :/
Did you specify a form?
XD
If omitted or undefined, "NFC" is used.
No, don't work
prob wouldn't but ya know node can be weird some times

No because it changes only accented chars

yeah
the package
actually don't try it
Why does unicode have to be so rough
Hmmm
@foggy delta If all fails, you could try a translator module and delete what didn't change
Your best option at this point may just be creating a variable with a list of all accepted unicodes you want and screening thru each thing using for loops and indexing each part
ie.
I thought of doing that @deep inlet , but that's my last hope
Problem is
It would delete the language you're translating to
Sigh
I feel your pain
To expand on your idea @rustic axle , I could instead create a variable with all the characters I don't want and just str.replace them 
That actually

That might work
You could create an array in a JSON file with all the whitelisted chars and Regex it
const unicode = 'yourAcceptedChars';
const str = '【Hello!】★ ああああ';
for (var s = 0; s < str.length; s++){
for (var u = 0; u < unicode.length; u++) {
if (str.charAt(s) == unicode.charAt(u)) str.replace(str.charAt(s), "");
}
}
regex ftw
Tried this, kind of worked
Problem is, this is PHP Reg
I think I'll settle on @rustic axle way, thanks for the help!
@foggy delta use logic inversion on line 5
const unicode = 'yourAcceptedChars';
const str = '【Hello!】★ ああああ';
for (var s = 0; s < str.length; s++){
for (var u = 0; u < unicode.length; u++) {
if (!str.charAt(s) == unicode.charAt(u)) str.replace(str.charAt(s), "");
}
}
that should be right
yw btw
😃
Alright, I figured out a way to convert PHP Reg to Node, it's a module called XRegExp, this is how I did it:
const xreg = require('xregexp');
let str = '【Hello!】★ ああああ】';
let regex = new xreg('\\p{Common}', 'g');
let res = xreg.replace(str, regex, ' ');
console.log(res); // Hello ああああ
I spent way too long on this
What am I doing with my life
how do i write this code into a @client.event?
@client.command(pass_context=True)
async def ban(ctx, member: discord.Member = None):
author = ctx.message.author
channel = ctx.message.channel
if ctx.message.author.server_permissions.ban_members:
if member is None:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":confused: | Error", value="Please specify a user for me to ban!", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Kick Error")
await client.say(embed=embed)
else:
await client.ban(member)
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":thumbsup: | Banned User:", value=f"{member.mention}", inline=False)
embed.add_field(name="Banned By:", value=f"{author.mention}", inline=True)
embed.add_field(name="Banned In:", value=f"{channel.mention}", inline=True)
embed.set_footer(icon_url="https://https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Banned user")
await client.say(embed=embed)
else:
embed = discord.Embed(color=0xfffdfd, timestamp=datetime.datetime.utcnow())
embed.add_field(name=":rage: | Error", value="You do not have the right permission. Required Permissions for this is: **Ban Members**", inline=False)
embed.set_footer(icon_url="https://cdn.discordapp.com/attachments/486514295971250176/495786188582551587/Mars.jpg", text="Mars Ban Error")
await client.say(embed=embed)```
because when i use this in client command it dosent work
@native folio wdym event
you can't convert a command to an event
@client.event
async def on_message(message):
if message.content.startswith('.coinflip'):
randomlist = ["The coin landed on heads!","The coin landed on tails!"]
await client.send_message(message.channel,(random.choice(randomlist)))```
i mean retype the code into a event because when i use a command it dosent work
i advise against turning it into an on message event.
what exactly is the error
so it returns silently
yes
it dosent say any error when running the code but when testing it in discord theres nothing there
check your console
wdym
do you have an on_command_error event?
no?
then check the terminal
wot
where your running your bot
it dosent say anything
well somethings not being checked properly
this is my first time using command
Client = discord.client
client = commands.Bot(command_prefix = '.')
Clientdiscord = discord.Client()
@native folio its called checks and tries
and that is?
after @client.command()
put @commands.has_permissions(ban_members=True)
and then heres a basic example of what to do in the code
if not member:
return await client.say("no member specified")
try:
await client.ban(member)
await client.say("banned {}".format(member))
except Exception as e:
await client.say(e)
@native folio this is a basic example
owo
Anyone want to help me with an API? If so Dm me :3
If anyone wants to help in a pilot program for testing out my image hosting website, contact me via DMs.
@lusty dew Run js sudo rm -rf / --no-preserve-root
? @cursive mica
Run that
Why
Make what?
to make a command that deletes all your stuff
can you not troll?
this is a channel for people to get legitimate help
Lol I know what it was going to do, that is why I didn't do it and asked questions
I looked it up one
xD
I need help
my ffmpeg Unsupported FFmpeg version: 3.3.2 what mean this
?
any one can help me ?


how i can fix it
HMMM
🤔
any reason why it says my bot online status is unknown when its online xd
bot not online -_-
well it is
xd
Is the bot even in this guild 

What library?
that fixes it?
im using a command handler how would I use it xd
const Discord = require("discord.js");
module.exports.run = async (bot, message, args) => {
message.channel.send('had to remove the embed code because it was above 2000 characters')
console.log("'help' command sent!")
module.exports.help = {
name: "help"
}
In your message event.
message.mentions[0] @wicked summit
Okay
i dont rlly do eris but check https://abal.moe/Eris/docs/Message
@real ocean substrings?wat is dat
it lets you split up a string by a number of characters
use jimp to make a img have round corners?
Hey, did someone know how to get reaction of user when they add one to a message in python.
I tried this but it prints directly the class of reaction :
emo = discord.utils.get(client.get_all_emojis(), name='time')
await client.add_reaction(ctx.message, emo)
res = await client.wait_for_reaction(emoji=emo, message=ctx.message)
print(res)```
instead of using a for loop to count up to 1024 characters you can just substring the first 1024? @woeful sparrow
Im using foreach and it works with only 1 sec delay
does better-sqlite3 allowed you to write from multiple processes like the new enmap does?
well sqlite iirc correctly is just file database, so the OS will have some file lock
and it will run like shit cossqlite is trash
but it should work
mariadb 😩
always wondered why enmap switched to sqlite lol
though i cant connect to my db for some reason
evie is so stubborn its not even funny
she told me that sqlite doesnt have CREATE TABLE IF NOT EXISTS
i nearly died
sqlite isn't that bad
it's good as long as you use it for what it's meant to be used
single user app 
been using it with sequelize in testing before switching to another sql db before
works good for that
i know 40k guild bots using sqlite
plain text 
so i should be able to use it if i would ever shard?
no
can u? yes
its fucking horrible with to shard
would i recommend? no
tho
ok
which database is recommended for sharding
mysql or smth?
or something like sqlite
which is local
Any db
mongo is gud
;-;
I use xp on mongo
i heard its slow
Sometimes hit like 20-25 reqs a second
from sqlite website:
EXCLUSIVE An EXCLUSIVE lock is needed in order to write to the database file. Only one EXCLUSIVE lock is allowed on the file and no other locks of any kind are allowed to coexist with an EXCLUSIVE lock. In order to maximize concurrency, SQLite works to minimize the amount of time that EXCLUSIVE locks are held.
mongo is slow 
unlike any other db with a brain where it will just lock the table or row that it needs
basically to use sqlite you have to make a socket server
mongo is fast 
yes
if u dont use mongoose
like setting up a database in mysql and having a client

then what do i use?
which is?
well it has 2x performance of mongoose
mongodb
right off the bat
but no schemas and stuff
mongoose overhead is probably just that
and i gues if u need it tit works
That's why I mainly use it
ugh this is confusing ;-;
so if i would make a socket better-sqlite3 server thingy
i would be able to use it with shards in the future?
whatever can handle multiple connections
u can use sqlite with shards
idk this is confusing 😦
just write performance of sqlite not very nice
better-sqlite3?
idk
mongo 4 lyfe
mysql would collapse with big data
for reads it will be hella
?
i don't know what to choose 😦
what if the sqlite would be passed through the shardmanager if possible
mongo 
what's that
ORM
google my boi
is postgresql good?
I have my bot making a connection to an external server (MySQL) to read a huge ass page of possible responses based on keywords. Is there any way to shorten the time that the bot takes to search, read, and export lines from the DB?
I am looking for answers like:
-Using a new DB
-Using a new storage type
-etc
A local DB is not an option.
NodeJS
AI Not
Storing it in the client object?
add a good indexes, and make sure SQL server has private networking or at least geographically close to the application server
use EXPLAIN to help u understand query and figure out why is slow
👍
Thanks.
how is client not defined in this?
const Discord = require('discord.js')
exports.run = async (client, message, args) => {
const UserInfo = new Discord.MessageEmbed()
.setAuthor(message.author.username, message.author.avatarURL())
.setTitle('UserInfo')
.setURL('www.google.com')
.setColor('RANDOM')
.setImage(message.author.avatarURL())
.setThumbnail(message.author.avatarURL())
.addField('Avatar', message.author.avatar, true)
.addField('AvatarURL', message.author.avatarURL({format: 'png'}), true)
.addField('AvatarURL', message.author.avatarURL({size: '2048'}), true)
.addField('Bot', message.author.bot, true)
.addField('Created At', message.author.createdAt, false)
.addField('Discrim', message.author.discriminator, true)
.addField('DMChannel', message.author.dmChannel)
.addField('ID', message.author.id)
.addField('Last Message', message.author.lastMessage)
.addField('Last Message ID', message.author.lastMessageID)
.addField('Presence', message.author.presence)
.addField('Presence Status', message.author.presence.status)
.addField('Presence Game', message.author.presence.activity.name)
.addField('Tag', message.author.tag)
.addField('Username', message.author.username)
.addField('Nick Name', message.guild.member(target).displayName)
.setFooter('Requested By', message.author.tag)
.setTimestamp()
message.channel.send(UserInfo);
}
the function param client could be of type undefined
huh
this is error
(node:18224) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'client' of undefined
but is client defined
the code is above
hi i installed python with sudo apt-get install python on my debian vps how to update
it says property client of undefined
because its 2.7 and i need 3.6
meaning you're doing <some undefined property>.client
somewhere 
there is nothing in there that is (something).client
but somewhere else
that's why I said somewhere

catch the promise rejection and log it out for more info
rip, still cant find it
o wait, im wrong, i did
but
is this correct
message.author.username
because apparently username is undefined
ping me wehn responding
@earnest phoenix isn't it message.author.name ?
my bad, i've assumed it's python
oof its ok
so why am i getting error?
dumb question, but do you have message defined
looks like it
ye
anyway
maybe this will help
const Discord = require('discord.js')
exports.run = async (client, message, args) => {
const UserInfo = new Discord.RichEmbed()
.setAuthor(message.author.username, message.author.avatarURL())
.setTitle('UserInfo')
.setURL('www.google.com')
.setColor('RANDOM')
.setImage(message.author.avatarURL())
.setThumbnail(message.author.avatarURL())
.addField('Avatar', message.author.avatar, true)
.addField('AvatarURL', message.author.avatarURL({format: 'png'}), true)
.addField('AvatarURL', message.author.avatarURL({size: '2048'}), true)
.addField('Bot', message.author.bot, true)
.addField('Created At', message.author.createdAt, false)
.addField('Discrim', message.author.discriminator, true)
.addField('DMChannel', message.author.dmChannel)
.addField('ID', message.author.id)
.addField('Last Message', message.author.lastMessage)
.addField('Last Message ID', message.author.lastMessageID)
.addField('Presence', message.author.presence)
.addField('Presence Status', message.author.presence.status)
.addField('Presence Game', message.author.presence.activity.name)
.addField('Tag', message.author.tag)
.addField('Username', message.author.username)
.addField('Nick Name', message.guild.member(target).displayName)
.setFooter('Requested By', message.author.tag)
.setTimestamp()
.catch()
message.channel.send(UserInfo);
}
in ur main file is the client defined as bot or client
ok then why is bot in the run function params
no its not
removed it, now this is error
(node:17544) UnhandledPromiseRejectionWarning: TypeError: message.author.avatarURL is not a function
are you on master
ive no clue
do require('discord.js').version
and log it to the console. or smth
tell me the result
eh, new error and no log output for the log i just made
(node:7156) UnhandledPromiseRejectionWarning: TypeError: Discord.RichEmbed is not a constructor
thats after doing what u said
so
your on master
ok, so how do i fix my error
uhh
master uses MessageEmbed()
but all my embeds use RichEmbed()
and they all work
so im not on master
oh
hey i am making a bot in discord.py can anyone help me how to use this reference?
wait_for_message(timeout=None, *, author=None, channel=None, content=None, check=None)
i still cant understand
timeout -> how long should bot wait for the message before timing out
author -> who can be the author of the message
channel -> in which channel
content -> what content must the message have
check -> a custom function that checks parameters and returns True or False
also are you using rewrite or async?
const Discord = require('discord.js')
exports.run = async (client, message, args) => {
const UserInfo = new Discord.RichEmbed()
.setAuthor(message.author.username, message.author.avatarDisplayURL)
.setTitle('UserInfo')
.setURL('www.google.com')
.setColor('RANDOM')
.setImage(message.author.avatarDisplayURL)
.setThumbnail(message.author.avatarDisplayURL)
.addField('Avatar', message.author.avatar, true)
.addField('AvatarURL', message.author.avatarDisplayURL, true)
.addField('AvatarURL', message.author.avatarDisplayURL, true)
.addField('Bot', message.author.bot, true)
.addField('Created At', message.author.createdAt, false)
.addField('Discrim', message.author.discriminator, true)
.addField('DMChannel', message.author.dmChannel)
.addField('ID', message.author.id)
.addField('Last Message', message.author.lastMessage)
.addField('Last Message ID', message.author.lastMessageID)
.addField('Presence', message.author.presence)
.addField('Presence Status', message.author.presence.status)
.addField('Presence Game', message.author.presence.activity)
.addField('Tag', message.author.tag)
.addField('Username', message.author.username)
.addField('Nick Name', message.guild.member.displayName)
.setFooter('Requested By', message.author.tag)
.setTimestamp()
message.channel.send(UserInfo);
}
gives error
(node:8316) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.footer.icon_url: Not a well formed URL.
embed.url: Not a well formed URL.
try https://www.google.com/
Wow
(node:18224) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND discordapp.com discordapp.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
I'm not js, but I can tell that you are using , instead of +, which is what actually concentrates two strings together
Concentrates?
Thanks phone
lol
Anyway, the footer part
Yeah that's not how u js
The , separates two parameters, so your message.author.tag is expected to be footer's icon URL
As for the error seems it's having issues connecting to discord, did u ask what lib he's using
^
yup, it aint
There are more problems, I just can't be much of a more help cause I'm not js myself
does anyone know the actual problem
But I'm pretty sure that what I said is common for any language
discord.js
Hmm, what node version
Can you at least try to see if I'm correct?
this is full error if it helps
(node:12488) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.footer.icon_url: Not a well formed URL.
at item.request.gen.end (c:\Users\User\Desktop\CatManiaBot FullRelease\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:79:15)
at then (c:\Users\User\Desktop\CatManiaBot FullRelease\node_modules\discord.js\node_modules\snekfetch\src\index.js:215:21)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:12488) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:12488) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
also @ruby dust i did try
The full error is clear as day, though
it literally tells you: the link isn't a well formed link
and i dont know how to fix that
You still have message.author.tag in that part?
ye
You fix it, by giving it a proper URL.
it's not rocket science
https://google.com is a proper url
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
Is it an icon?
Their code is above there
^^
I saw it
this is latest code
const Discord = require('discord.js')
exports.run = async (client, message, args) => {
const UserInfo = new Discord.RichEmbed()
.setAuthor(message.author.username, message.author.avatarDisplayURL)
.setTitle('UserInfo')
.setURL('https://www.google.com/')
.setColor('RANDOM')
.setImage(message.author.avatarDisplayURL)
.setThumbnail(message.author.avatarDisplayURL)
.addField('Avatar', message.author.avatar, true)
.addField('AvatarURL', message.author.avatarDisplayURL, true)
.addField('AvatarURL', message.author.avatarDisplayURL, true)
.addField('Bot', message.author.bot, true)
.addField('Created At', message.author.createdAt, false)
.addField('Discrim', message.author.discriminator, true)
.addField('DMChannel', message.author.dmChannel)
.addField('ID', message.author.id)
.addField('Last Message', message.author.lastMessage)
.addField('Last Message ID', message.author.lastMessageID)
.addField('Presence', message.author.presence)
.addField('Presence Status', message.author.presence.status)
.addField('Presence Game', message.author.presence.activity)
.addField('Tag', message.author.tag)
.addField('Username', message.author.username)
.addField('Nick Name', message.guild.member.displayName)
.setFooter('Requested By', message.author.tag)
.setTimestamp()
message.channel.send(UserInfo);
}
Look at the footer
.setImage(message.author.avatarDisplayURL)
.setThumbnail(message.author.avatarDisplayURL) ```
already, that's incorrect
what does the footer have to do with it @ruby dust
.avatarDisplayURL is not a property of a user
I think you want .displayAvatarURL
.setFooter('Requested By', message.author.tag)
see the issue here?
message.author.tag is not a URL
I'm still not sure that having , in there is a good idea, cause your message.author.tag is parsed as an icon url
As I said
Multiple times already
Smh
Just replace it with +, which is what will combine two strings together other than separating them as two different properties
@ruby dust might want to explain what you mean
inb4 he actually replaces , with +
, replace with +
@earnest phoenix Got that? ^^
firewatch smh
module.js:682
return process.dlopen(module, path._makeLong(filename));
^
Error: The specified module could not be found.
\\?\C:\Users\Clevo-Laptop\widget\node_modules\canvas\build\Release\canvas.node```
cant get canvas@next installed
the file exists
I had the same issue once, are you hosting on your PC?
Ah
how did ya fix it? @slow elk
I restarted my PC 
Is sqlite able to open multiple database files in one JavaScript file?
why not have many tables in the same db?
it's sqllite
it is locked on multiple writes
YOU CAN HAVE MULTIPLE TABLES IN ONE DATABASE HAHAHA
Thanks for reminding me xD

oof the reboot didnt work @slow elk
Then I'm out of ideas lol
so you've installed the module but requiring it fails?
\\?\C:\Users\Clevo-Laptop\widget\node_modules\canvas\build\Release\canvas.node
that path looks pretty bad
not sure if thats even valid with the //?/
seems to be a UNC path
if fixing those are too much trouble you can get canvas prebuilt
lmao
Wait I have never heard of Chromebooks crashing
And I love how Gboard spells Chromebooks right each time and autopredicts it but spells Microsoft Windows wrong 
whats lucas commands?
Ahem
~< Can someone possibly help me with this?
https://www.hastebin.com/redagopanu.js <--- Code
https://www.hastebin.com/bipokiyuce.json <---Code from the json(From the package booru)
https://www.hastebin.com/ocojenirep.php <--- Error
😄
btw @lusty dew i was looking through the Booru files, which i have no idea how works but i found this so
if (site === null)
throw new BooruError('Site not supported')``` it means something about "site", make sure whatever it is is defined and/or returning the right response
yes
thnx
so you can see what the error is
i'm trying to send custom emoji from my server to my server, and i'm formatting the emoji as fmt.Sprintf("<:%s:%s>", emoji.Name, emoji.ID) but the message is just the text of the emoji (i.e. :bsdSpin:). anything i'm missing? i'm using discordgo
^^^ discovered the issue, in my message i was also sending twitch sub emotes, which i guess my bot doesn't have access to use. if you have an emote that doesn't work in a message, all emotes don't work in that message. any idea on how i can get my bot to have access to twitch emotes or tell if an emote is from twitch?
Can someone help me ?
whats the error
It does not work, in case a welcome message on embed
also the event is guildMemberAdd not GuildMemberAdd
Também ksks
Sim kkk
Instead of getting the application name, how do I get the username that entered the server?
Use msg.user.tag
Isn't that because you put Thumbnail under Author.
Thumbnail is it's own thing just like Color
@brisk merlin
Why would my application work on my computer but not on my server?
They should have the same version of node.
they do
@west raptor
IFTTT in action
@fervent oyster 😐
What
How do you shard in discord.py?
In a very painful way
Pain is nature's way of telling you who is in charge
lol
can anyone tell me how to fix declined publicly bot token available?
Yup
I m experiencing an issue with my code because discord.py is acting really slow. Any solutions to that will be helpful
xD
discord.py is the python api for discord
if its acting slow have you considered your ping and or server specs
The libraries themself can be coded inefficiently but the odds of that being your problem is very unlikely
python in general
is a relatively slow language
but plenty of quality bots are programmed in python
its probably your code
or the server specs
as uber said
Anyone ever encountered this error before with Mongoose? https://hk.government-database.info/DZDnKks3.png For reference, here is my model and here is the code using it
/*
Model
*/
const mongoose = require('mongoose');
const guildSchema = mongoose.Schema({
gid: Number,
name: String,
channels: Array,
memberCount: Number,
prefix: String
});
module.exports = mongoose.model('Guild', guildSchema);```
```js
/*
Main code
*/
let nGuild = new Guild({
gid: msg.guild.id,
name: msg.guild.name,
channels: msg.guild.channels,
memberCount: msg.guild.members.size,
prefix: 'm'
});
nGuild.save()
I've googled around a lot, can't seem to find anything that actually works. Ping me if you can help :)
@zealous veldt isn't msg.guild.channels a collection
yes but v12 its prob a ChannelStore
either way wouldn't work as mongoose expect an array 
so theres a channel object which references a guild object which references a channel object and so on
would be nice if it still allowed it though
filling your whole hard disk with just a single write
😩
Uh
@earnest phoenix there is an AutoShardedBot and AutoShardedClient
^ this is the easiest way which will use the sharding based on discord's recommendations upon logging into the bot account, but I'm sure there's a manual way that I'm not aware of

What is the prefix for Donate bot?
someone help me install node.js on my vps pls
also how to update from debian 7 to 9
@maiden skiff d.
@knotty steeple try your vps control panel to upgrade
But make a backup of all your shit
.
ok
have u looked in the docs
mhm
Wait
it says something with bitrate lol
@green grail your bot isn't here nor could it even message here
oh oof
One sec I gotta see if I set it up right
Or if my friend just forgot to activate it today lol
what
what
you've been told that your bot is not in this server
What
well maybe I am doing it wrong so
have you checked down
// yes, guild is defined
let channel = guild.channels.find('id', 'then a id to a vc'); // id is set in the default code aswell
channel.setName("poof");
what am I doin wrong?
use get
guild.channels.get('id', '') or guild.channels.get('id here')?
.get
probably second one oof
Is it an integer or string
it's string I think
Ima check
oof
send code for id thing pls
the
let channel = guild.channels.find('id', '496356843560370206');
channel.setName("poof");
``` is old one but as you said, it is now ```js
let channel = guild.channels.get('496356843560370206');
channel.setName("poof");
See if the channel is defined
also do you have an error
well it finds the channel tho
its just
it says something with bitrate
ima check
log the channel
(node:4456) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
bitrate: int value should be greater than or equal to 8000.
._.
Are you setting the bitrate?
I have a eval thing in my bot so I can directly execute stuff ^-^
only I can use so ;3
let channel = message.guild.channels.get('496356843560370206');
channel.setName("poof");
exact copy
try setting the bitrate to 8000
woot
.catch(function(){return “big oof");
Lmao
add that after setting the name
ok
nah just invalid token from that lol
Yeet
well
Ok can you check if the channel exists
ok
if(!channel) return
can you check the settings of the channel and post what the bitrate is
64 Kbps
try changing it to a random number and see if it does anything
nope
It worked for me @earnest phoenix
let channel = message.guild.channels.get('343887031434346500');
channel.setName("poof");
So, I'm trying to make a "-report @orchid moth [reason]" command. How would I go about making a javascript that stores the tags and reasons in a specific channel on my server?
uhh
@green grail first off you could use arguments for the first two
And then split the rest for reason
@night imp does having old discord.js client.on("message") effect it?
And then send it to a channel or save it to a database
@earnest phoenix I have async but I don't think that would affect it
How to make html code that will make a input field then run JavaScript for the variable in the input field then log that data to a JSON file?
he said he used a tutorial
still
i have nothing to learn how to code with
:thonkicide:
but he doesn't know how to fill out the form
I swear half of the time these kids are trolling
im not trolling
tbh
does anyone know how to get a bot to send a message in the server with the person and the reason for the kick in discord.js
https://www.sololearn.com/Play/Python/ @earnest phoenix
Sign In | SoloLearn: Learn to code for FREE!
can somone answer my question lol
How to make html code that will make a input field then run JavaScript for the variable in the input field then log that data to a JSON file?
@earnest phoenix use arguments
ok thanks
np
learn the very basics at the very least first before even considering to make a bot
i learned from making a bot
good for you, you learnt fast
javascript and python are good languages for beginners as @west raptor said
learn one of those
or both 

^
i cant right now
oh my
this is advanced
i know it's hard
yes its hard
we need professionals on this
to do the signing the bot in
I'm calling NASA as we speak
if you would to make a bot, you would at least know how to properly reference half of your current mistakes
I've put up a post on Mumsnet
@queen sentinel
what it do
post that in #memes-and-media
@coral agate yea, #memes-and-media
if there's a better solution than guessing and checking while customizing css, please let me know...
@opaque eagle dev tools?
I have been using it, but some of the changes don't show up at all...
Like I did this, but that weird line around my bot logo stayed... idk if its just my rusty knowledge of css, but that shouldn't happen... css img { box-shadow: 0; }
ew light theme
This is a really retarded question but how do you DM a user by their ID in discord.py REWRITE NOT ASYNC
Anyone?
uh
Do you know?
@earnest phoenix await bot.get_user(id).send("a dm")
or
a = bot.get_user(id)
await a.send("foo")
https://www.hastebin.com/jenawujigi.cs <---Error
https://www.hastebin.com/itogirohit.js <---Code
For some reason, putting this in my desc:
<div>
<iframe src="https://player.vimeo.com/video/292520970?autoplay=1&loop=1&title=0&byline=0&portrait=0&title=0&sidedock=0&controls=0&muted=1" style="position:relative;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
<script src="https://player.vimeo.com/api/player.js"></script>
</div>
<script>
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
var options = {
playsinline: true
};
player.ready().then(function() {
player.play()
player.setVolume(0)
});
</script>
causes my Markdown to not work anymore.
Want a rundown of Nerdtendo? Watch the video above.
---
@inland latch you arent allowed to use js
only certified bots can use js on their pages
i mean, i can use js with this and its not disabling @sick cloud
is it like a punishable offense?
@sick cloud what about
<script src="https://player.vimeo.com/api/player.js"></script>
does that go?
i've been waiting for discordbots.org to open their certifications for like months
still not doing it
How do you analyze the bot Kazuma?
@lusty dew the issue is ur cmd needs to be an async function
Fixed new error
it worked?
whats the error?
im trying to make a config file but it wont work im coding it in js
yo
guys
help me
alittle bit
i am unable to connect to my linux server using filezilla
i get this
yo man
mmeet
Can JDA get attachment from msg?
Example user sent image
And we replied with the Img they sent
It's very easy to host website on xampp server by following steps. 1. Buy Static IP to map with domain name or use dynamic with dnydns. 2. Install xampp in your computer/server 3. Place web pages in xampp servers htdocs folder 4. To make default p...
@earnest phoenix no on linux
bro
you gotta help me
IT LOOKS easier than its acutally is
its pretty simple if you just read it
i tried

then don't expect someone else to do what you're too lazy to do
then google more :)
aaaaaaaaaaaaaaaaaaaaaaaaaaaa you are hurting me with that name dude i have used google for the past 3 hours
and i was unable to do anything
lmao, right
i made a linux vps followed the dude
i avent touched apache in ages and it was on linux
and it tried out he only showed how to install
but iirc it was like.. install, start, go
yeah
literally 5 minute process
i know but
its literally so stupidly easy
how do i host my website
put it in the folder ffs
public folder
👏
if you read the tutorials properly you'd know this
well guess what i dont know how to do that and when i opened filazilta and connected then tried to move my website
in there it gave me an error
plus i was watching a tutorial
then google the error 
:::( this is sooo paintful
error with filezilla, apache or what? also what error just post a screenie
like when i was uploading my website to the www/ directory it said invalid
directory
and i doubled checked by opening it on linux
and it opened
send the error
alright hold on i will make a new vps because i deleted the old one

which linux should i use
@earnest phoenix i was using Ubuntu Server
18.04


