#development
1 messages · Page 387 of 1
I have a lot more arguments that can take up to 5 more hours to this convo, but I will leave it for now
I don't like the phrase: for now
exactly
My messages express my emotions too. Absolutely emotionless.
this is #development
I didn't start this convo but i'll end it NOW!
OK!
oof
why is it when i mention a certain person it has <@!id> instead of <@id>
If a user/bot has a nick name set in a server, they would have <@!ID> instead.
oh
Asking again, hopefully someone is awake now that can help :>, is there a way to make mysql entry's with data from EVERY server the bot is in?
i feel like thats some dns shit
so I was asking not too long ago about this error being printed instead of the command execution
UnicodeEncodeError: 'ascii' codec can't encode characters in position 86-98: ordinal not in range(128)```so I now kinda know it's cause, it's because it's either the server's name or the user's name contains at least one non-standard character, is there a possible way to just ignore the character alone or somethig similar? since I need to see the command execution and that error is in the way
how is that gonna help me? and is it really a thing in python?
heh
Idk if this will help or not http://www.tutorialspoint.com/python/python_reg_expressions.htm
Python Regular Expressions - Learn Python in simple and easy steps starting from basic to advanced concepts with examples including Python Syntax Object Oriented Language, Methods, Tuples, Tools/Utilities, Exceptions Handling, Sockets, GUI, Exten...
I do not think that regular expressions is what I'm looking for
Hmm, I don't know then. Sorry.
well anyway, I'm going to sleep now and won't be available for the next 15 hours, so I'm just going to find the answer by searching for a mention if anyone has an answer to my issue, thanks in advance
<div class="container is-widescreen">
<div class="longdescription">
<div class="content">
<style>
article .container:nth-of-type(5) {margin:0;padding:0;max-width:100%;width:100%;}
article .container:nth-of-type(5) .longdescription {padding:0;}
article .container:nth-of-type(5) .longdescription .content {padding:0;}
article .container:nth-of-type(5) .longdescription .content iframe {height:100vH;width:100%;border:none;}
</style>
<div><iframe id="botiframe" onload="setRegularIframe('Magic 8 Ball');" src="https://innerjoker.github.io/" width="100%" height="100%" style="display:flex;">
Update your browser to see this
</iframe></div>
</div>
</div>
</div>
am i not allowed to use this (just copied the stuff from rythm lol)
<div class="container is-widescreen">
<div class="longdescription">
<div class="content">
<div>
<iframe id="botiframe" onload="setRegularIframe('Magic 8 Ball');" src="https://innerjoker.github.io/" width="100%" height="100%" style="display:flex;">
Update your browser to see this
</iframe>
</div>
</div>
</div>
</div>
kill the onload
awesome
@uncut slate I'm having trouble loading the webpage lol
It just doesnt load
What's your bot's link?
report for fake!!!
Hmmmm, is there a specific function in async that lets you change the bot's prefix in a specific server but nowhere else? I have the update and insert parts ready for the command I just need to know the function. (if it exists)
the only way to change a server's prefix is to store it as a data, discord.py can not be used for storing datas
hi
I am storing the data in a database
which lib?
whats the script
jusg put that?
what library tho?
...
you have a bot dev role, and you don't know what library you used to make your bot?
xddddddd
Requesting Help
Language: Javascript
Libraries: Enmap, discord.js
Code:
let guilds = client.guilds.map(g => g.id)
let settings = client.settings.keyArray()
for (let i =0; i < settings.length; i++) {
if (!settings[i].includes(guilds)) {
client.settings.delete(settings[i])
}
}
What it's supposed to do: Delete all the settings that the bot is no longer in. It is in the ready event
Problem: It is not deleting anything.
Error: No errors were produced on console. Any help would help. Thanks
whats that
wow, this question is so well made that I want to answer but idk this language xd
is anyone on discord.net
I try to be organize and straight to the point.
I really don't want to go to the discord.js server or the coding den as everyone eats you up like a pool of sharks prancing on one fish
await member.ban()
```that would be for discord.py, so it shouldn't be that hard with C# as well, just look at discord.net docs
Ahh I put it after the client.setInterval, so after the three minutes it did it. So I just moved it above the interval
OK, i'm back....@bot.command(pass_context=True, aliases=['PREFIX', 'Prefix']) @commands.has_permissions(administrator=True) async def prefix(ctx, *args): prefix = db['prefixes'] prefix.insert(dict(name='{}'.format(server.name), preifx='{}'.format(args))) That is my code so far....i'm just wondering how to transfer the stored data into a function that updates the prefix used in the server
I don't know how to say this, and I don't know if it's a good idea, but what you can do is to load the server prefixes in a memory, that way you'll avoid constantly spamming your database with checks if the message was a command or not
Load the server prefix in a memory....I don't know what it is but i'll search google to find out
your system's RAM is a memory, for example
ohhhh ok that's what you meant...right
So to update the prefix I need to first load the prefixes into the memory then make a check for the prefix at the beginning of every message...right...ok i'm good...thanks 😃
I'm pretty sure discord.py handles the "command or not command" check
oh ok...thanks 😃
Great. It did the opposite of what it was supposed to do...whiCH WAS NOT TO ERASE THE ENTIRE FLIPPING DATA
that's why you always test with a test bot first
I did. It worked perfectly fine.
@earnest phoenix
public async Task Ban(IGuildUser user)
{
await Context.Guild.AddBanAsync(user);
}
Are channel IDs unique across Discord?
Yes
Ahh great, thanks
When you get your bot approved, can you customize the page like Tweetcord?
Yes, you can
O
well, you can already do that before approval
I don't see anything
Edit button
Like how's it's black around the edges
that's custom HTML and CSS
that's not included with DBL, that's something I had made myself
of course you can make it on your own
I'm not sure what you're asking, there's a single edit button which is all you need
On the edit page in that lil code editor you can target the whole bot page using HTML and CSS you can even override already existing CSS Tags, hell you could even make it load your own html entirely
that last bit isn't worded too well, to be clear, you can't remove any elements from the DOM
full HTML+CSS is very lenient, you could just make an overlapping element if you want, which is more or less writing your own bot page from scratch
is if not guild a good enough check in discord.py to check if the command was executed in the guild or a DM?
can someone tell me a gud database in npm that is not enmap nor rethinkdb cause it sends errors to me
@earnest phoenix postgres is good
👍
i'd recommend taking a look at this @earnest phoenix https://discordjs.guide/#/sequelize/
A guide made by the community of discord.js for its users.
that's how i got started with postgres
even if you don't use d.js you can still adapt it to your code
ok
also the actual lib ur looking for is https://www.npmjs.com/package/pg
lol
in discord.js, can i have multiple event of the same kind?
yes
u can hv a lot of em
ok thanks
no prob
for(var x = 0; x == client.guilds.size; x++) {
message.channel.send(client.guilds[x].name);
}```
why doesn't this word
*work
?
.map(g => g.name).join(", ")
thanks
Np
Yes that will work, just remove g.name with g
You won't be able to send that in a discord message though
Oh
@steel tinsel so you want to make an invite
i mean, enter the servers
Yes it's possible
I have a command like that
Just generate a invite for a channel in the guild so like !<botadmin geninv <guildId> generates an invite for the guild unless it runs into an error
ok
i'm testing various things
And use the create invite function after you get the channel from the client and upon an error try again, but splice the old channel id out and if you keep getting Errors check for the permission to create invite for the bot
That's how I do mine
let maor = client.guilds.map(g => g.fetchInvites().code).join(", ");
message.channel.send(maor);```
?
Um
That will work but I just create a new invite with my command
@steel tinsel
doesn't work
Error?
fetchInvites is async
Thanks, is this discord.js?
.
Hmmmm, is there some form of format that I can use to prevent any {} or , from seperating the arguments given in my warning command (if it sounds like i'm speaking gibberish look at the image below)
...
I'm more surprised on how did you even manage to do that...
ok....thanks.. 😃
Yea, you can be surprised all you want because either way....i'm a bad dev....have you not made your point clear yet?
aye
yeah that should work correctly lol
np
the point is, I don't even know how to do what you did
I think I know
pretty sure its .join yeah
oh...oh erm...wow..erm...I don't want to accidentally respond in the wrong way to that...lol
he is probbly joining with spaces
yea
?
and use *args as a Key word in the command
Whats the code
that's how I did it
or ' '.split(), even better
Lol
embed.add_field(name='Reason:', value='{}'.join(args)) That's just the reason line of code
...
wai again
async def warn(ctx, user: discord.Member, *args): for the KeyWords
k
aliases=['Warn', 'WARN'])
@commands.has_permissions(kick_members=True)
async def warn(ctx, user: discord.Member, *args):
try:
embed = discord.Embed(title='Warning:', description='You have been given a warning in {}!'.format(ctx.message.server.name), color=0x6e7be1)
embed.add_field(name='Server:', value='{}'.format(ctx.message.server.name))
embed.add_field(name='Reason:', value='{}'.join(args))
embed.add_field(name='Moderator:', value='{}'.format(ctx.message.author.name))
embed.set_footer(text='{}'.format(ctx.message.author.name), icon_url=ctx.message.author.avatar_url)
await bot.send_message(user, embed=embed)
except Exception:
await bot.say('I cannot do this. I may be unable to do this because either you or me are not permitted')```
Am guessing you are not using js
nope...Python
knew it
lol
then i am no help
yep, he treats spaces as string separators with .join
ok...thanks for trying anyway 😃
ok
I'm just saying, this '{}'.format(ctx.message.author.name) can be far more simplistic
for example, ctx.message.author.name
literally
that was probably the main reason why .join treats your spaces as separators in args
oh ok 😃
@ruby dust Whats your gender? (so i don't assume your gender and confuse everyone even more)
value='{}'.replace(/{}/g, " ");) My guess would be that this is correct...although there is a high chance that I have goofed up lol 😄
19 year old man that has a job
Lol
12 year old newb that doesn't even get allowence
you are still overcomplicating everything
lol
I'll soon move to C#, and that means rewritting my bot from python to C# as well
wrong channel but whatever
lol
value='{}'.replace(/{}/g, " ");.format(args)) Hmmmm...have I over complicated it?
you are using codes even beyond my knowledge, I don't even know if that is possible
thats called javascript
and you are using regular expressions
and why are you putting a . after a semicolon
remove that semicolon else syntax error
he's using python
no I mean
I mean JackTEK
that looks very distinctly like javascript
the g after regexp
etc
oh ok....sorry lol
hello does anyone know what this means https://i-illegally.entered.space/352s8g.png 
i can't find a String.prototype.startsWith anywhere
Do You know what caused it?
nope
how do these web devs add discord's oauth to their sites? like dbl for example
with a webserver and (discord) application clientid + secret
that did not really help
google "implementing oauth in $LANGUAGE"
k that helped, thanks
I'm consistently getting this error randomly while my bot is online, I have no idea why.
What's above events.js
<Client>.on('error', err => { ..... })
So should I attempt to restart it if it runs into an error?
yes
Yes
Why TF am I unable to send that into a channel (server is owned by me)????
I'll just try without the role mentions
<@&304313580025544704> When do I actually get my Bot Developer Rank?

have a muted rank
ye sry 😅
👀
you don't even have any bots in the queue
@nimble merlin probably because it's too long
#development isn't the right channel for this
@surreal peak no, Clyde wouldn't respond with a message stating that the reciepnt may have blocked me blah blah blah
Anyway...after messing around with which role is mentioned I found a few that don't like to be mentioned lol
weird
Heyo
@ruby dust are you looking for oauth in django or sth?
I added a feature to my bot that generates streams of Radio New Vegas and then plays them
100% random, uses all the files from the game
The glory of Mr. New Vegas, broadcast to you by a program I made.
there's an example of something it generated
@nimble merlin Channels (and other mentions) are looked as “#Channel” by the client but something like “<#1234567890...>” by Discord itself, meaning if you have a message that has mentions in it and is only just below the 2K character mark, the client will think it’s ok to send (and won’t give you an error for it) but Discord will see it as being over 2K characters and will give you a generic error message
oh ok...thanks 😃
Would it be better to store disabled commands in one value with serverdata row or make a table dedicated to it? (MySQL)
load db into memory on bot start and do it from an array or sth
multiple values in 1 column = gay
use a dedicated table
disablecommand | serverid
select * from disabled where serverid = ?
OK...first of all...my mind is like jelly (jello) rn, secondly, how would I make the bot collect the argument provided for this line of text (using a string breaks if for some reason): await self.bot.purge_from(ctx.message.channel, limit=something...)
Yea, sorry I can't figure it out myself...but like I said...my brain is like jello (or whatever americans call it) so I can't think...at all
yeah limit is supposed to be a int
hmmmm
maybe I can just replace the arg keyword with int....actually....I should have done the before
k I fixed it
can someone help me with my code?
show code
im trying to make an achievement command and so im trying to split the command from the argument given
ok
//XBox Achievement
if (message.content.toLowerCase().startsWith("ples achievement")) {
//let d = new Date();
const args = message.content.slice(config.PREFIX.length).trim().split(/ +/g);
//let mention = message.mentions.members.first();
var loadedImage;
let text = args[2];
const sayMessage = args.join(" ").slice("ples achievement ").trim();//.split(/ +/g);
jimp.read("http://lancelarsen.com/wp-content/uploads/2013/05/Achievement0-ThatConference-Blank.png")
.then(function (image) {
loadedImage = image;
return jimp.loadFont(jimp.FONT_SANS_16_WHITE);
})
.then(function (font) {
loadedImage.print(font, 110, 60, `${sayMessage}`)
.write("image4.png");
})
.catch(function (err) {
console.error(err);
});
setTimeout(function() {
message.channel.send("Markup image:", {
file: "image4.png"
});
}, 1500)
}
erm
var 
- dont autoreact
?
your auto reacting to a phrase called ples achievement
ok.... so what do i do to fix dat.
make sure all your commands start with a prefix
That's smart.
ok

then your fine
so what do i do about it :/
whats the problem
the result of this code is:
with the code
@daring dust also don't use var unless you are using its global scope for a reason, you would rather use let or const
wits the problem with it
it includes the les achievement
yes :/
woop
it only slices the p out of the image
just for further reference im working with an npm module called Jimp
but that's not the problem
i've seen that but..
@daring dust instead of returning the message content you would return the command args
am i currently returning the args or message content?
//XBox Achievement
if (message.content.toLowerCase().startsWith("ples achievement")) {
//let d = new Date();
const args = message.content.slice(config.PREFIX.length).trim().split(/ +/g);
//let mention = message.mentions.members.first();
let loadedImage;
let text = args[2];
const sayMessage = args.join(" ").slice("ples achievement ").trim();//.split(/ +/g);
jimp.read("http://lancelarsen.com/wp-content/uploads/2013/05/Achievement0-ThatConference-Blank.png")
.then(function (image) {
loadedImage = image;
return jimp.loadFont(jimp.FONT_SANS_16_WHITE);
})
.then(function (font) {
loadedImage.print(font, 110, 60, `${sayMessage}`)
.write("image4.png");
})
.catch(function (err) {
console.error(err);
});
setTimeout(function() {
message.channel.send("Markup image:", {
file: "image4.png"
});
}, 1500)
}
message content
//XBox Achievement
if (message.content.toLowerCase().startsWith("ples achievement")) {
//let d = new Date();
const args = message.content.slice(config.PREFIX.length).trim().split(/ +/g);
//let mention = message.mentions.members.first();
let loadedImage;
let text = args[2];
const sayMessage = args.join(" ").slice("ples achievement ").trim();//.split(/ +/g);
jimp.read("http://lancelarsen.com/wp-content/uploads/2013/05/Achievement0-ThatConference-Blank.png")
.then(function (image) {
loadedImage = image;
return jimp.loadFont(jimp.FONT_SANS_16_WHITE);
})
.then(function (font) {
loadedImage.print(font, 110, 60, `${text}`)
.write("image4.png");
})
.catch(function (err) {
console.error(err);
});
setTimeout(function() {
message.channel.send("Markup image:", {
file: "image4.png"
});
}, 1500)
}
because when i do that it only returns the first word
i tried doing multiple arugments of text but when they don't have a word in them they return undefined
do you know what the args declaration is even doing 
theres more to it
its also splitting everything that is split by spaces into its own thing
so lets say bad meme was sliced, bad would be args[0] and meme would be args[1]
so lets say somebody says ples achievement meme, it would treat meme as args[2]
yep
and JS starts with 0 so the first thing in a message is 0
thats your own can of worms
slice(2)
that too ^
so it cuts the first two arguments like this
//XBox Achievement
if (message.content.toLowerCase().startsWith("ples achievement")) {
//let d = new Date();
const args = message.content.slice(config.PREFIX.length).trim().split(/ +/g);
//let mention = message.mentions.members.first();
let loadedImage;
let text = args[2];
const sayMessage = args.join(" ").slice(2).trim();//.split(/ +/g);
jimp.read("http://lancelarsen.com/wp-content/uploads/2013/05/Achievement0-ThatConference-Blank.png")
.then(function (image) {
loadedImage = image;
return jimp.loadFont(jimp.FONT_SANS_16_WHITE);
})
.then(function (font) {
loadedImage.print(font, 110, 60, `${sayMessage}`)
.write("image4.png");
})
.catch(function (err) {
console.error(err);
});
setTimeout(function() {
message.channel.send("Markup image:", {
file: "image4.png"
});
}, 1500)
}
why
?
you split it, then join
no
^
oh it slices the individual characters
you would join then slice
so if it increase the number 2 it'll increase the amount of characters being sliced?
const sayMessage = args.join(" ").slice(args[0], args[1]);
...
oh
@daring dust hint: check out the link natan gave + slice doesn't work like that
finding music and moderation bots creaters tl work with me
im paying
DM Me if interested
i pay high
i kind of understand now
@earnest phoenix #development isn't really the place to say this
k
There is a huge difference between slicing a string and an array
and no its not bc args is already an array lmao
const sayMessage = args.split(/ /g).join(" ").slice(args[0], args[1]);
oh. but i'm pretty much stupid so don't expect much of me :/
...
did you try reading the docs i sent you?
or even the anidiots.guide link
read this
it explains exactly what you want to do
i did read that a bunch of times but ok :/
or this :/
i switched up my code a bit. now it doesn't give an error message but it also doesn't give an output :/
const args = message.content.slice(config.PREFIX.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
//XBox Achievement
if (command.toLowerCase().startsWith("ples achievement")) {
let loadedImage;
let text = args[2];
const sayMessage = args.slice(2).join(" ");//.split(/ +/g);
jimp.read("http://lancelarsen.com/wp-content/uploads/2013/05/Achievement0-ThatConference-Blank.png")
.then(function (image) {
loadedImage = image;
return jimp.loadFont(jimp.FONT_SANS_16_WHITE);
})
.then(function (font) {
loadedImage.print(font, 110, 60, `${sayMessage}`)
.write("image4.png");
})
.catch(function (err) {
console.error(err);
});
setTimeout(function() {
message.channel.send("Markup image:", {
file: "image4.png"
});
}, 1500)
}
is no one going to help me?
is there any way to ignore Bot leave messages? like when a bot leaves?
not sure what language you're using, but I'm pretty sure you could just... not add a function for that in your code? 
unless im misunderstanding your question but i doubt anyone else here will be able to understand it any better tbh
hi
can someone help
idk it puts error
when i make this command
!donate
it put not enough spring
whe
whelp
what language + library? also copy+paste error here (or screenshot)
....could you please take a screenshot of your error? That text is telling me almost nothing
ohhh fuck
NUUUUU
my vs
is broken
again
uh
i should not leave it like that
@idle mountain do u know how to fix
what is this a screenshot from?
vs
it's just microsoft having connection issues then, probably something with msdn? idk i've never seen that before
does anyone know if the max file size upload for a bot is 8000000 bytes or 8388608 bytes?
discord module not found?
@earnest phoenix
mine is alot more
its about 12111838 bytes
thanks
the value I have, after testing is 8388353 bytes
using this js $eval message.channel.send({ files: [Buffer.alloc(8388353)] }) it works, but I get a discord api error if I add a single bit to that number
if (response.headers['x-ratelimit-remaining'] !== '0') {
resolve(response);
} else {
reject('You are being rate limited!');
}```
why this returned undefined
nvm
any restcord users around?
How would I go about detecting emojis + global ones? Using eris and don't see anything related.
regex
How could I prevent this from happening when using args, the code I have right now is embed.add_field(name='Suggestion:', value='{}'.join(args).replace('/{}/', " ")) However this fails. I am using discord.py on async btw
just put a space instead of the {}
reeee
what??? Do you mean change .replace('/{}/, " ")) to .replace('/ /, " "))?
remove replace completely
oh ok
but then it gets surrounded by paranthesis and each word is separated by a comma
yea remove {} in "".join
.join joins strings in a list separated with whatever is in that string before so:
some_list = ["Nice", "One", "LuL"]
", ".join(some_list)
>>> 'Nice, One, LuL'
or in your case it did:
some_list = ["Nice", "One", "LuL"]
"{}".join(some_list)
>>> 'Nice{}One{}LuL'
and in replace you don't need to escape the {}
oh ok
only thing you'd escape in .replace would be the " or the '
ok 😃
I assume no one happens to know how the url https://canary.discordapp.com/assets/15eb2b4336a23cbbfb2c7f65983674ca.svg is generated?
ok fuck its md5 of the image reee
eww md5
😄
idk im trying to do hacky shit to pull all possible emojis
except i cant get the correct hash
yes i exactly did that
unicode emoji => codepoint => read the respective emoji svg => convert to md5
doesn't match
i've found all the hashes in discord's code, but no idea how they are mapped
How do I make it so that people can see how many servers my bots on.....
OK, so I want to make a giveaway function for my bot, however, I am stumped on how to select a random user from the server to win, if it helps you, here is my code so far: @commands.command(pass_context=True, aliases=['gstart', 'GSTART']) @commands.has_permissions(administrator=True) async def Gstart(self, ctx, *args): try: embed = discord.Embed(title='Giveaway:', color=0x6e7be1) embed.add_field(name='Prize:', value=' '.join(args).replace('/{}/', " ")) embed.add_field(name='Time:', value='2 Hours') await self.asyncio.sleep(432000)
@earnest phoenix await bot.say(str(bot.servers) <- That is for Python async BTW
I use discord.js
oh, sorry then...I can't help 😢
what does code grant really do, and how useful can it be?
I personally don't know...sorry 😄
then what's the point of answering, if you don't know just don't say anything
@ruby dust certain bots need a user to authorize with oauth before they're invited, that's what code grants are for
so I assume it's how @torpid cliff works? cause you can't invite that bot as easily as normal bots
yeah, for example
FROM openjdk:9-jre-slim
LABEL name "Lavalink"
LABEL version "2.0.0"
LABEL maintainer "Yukine <DevYukine@gmx.de>"
WORKDIR /opt/Lavalink
RUN apt-get update \
&& apt-get install -y curl
RUN curl -o Lavalink.jar https://ci.fredboat.com/repository/download/Lavalink_Build/3112:id/Lavalink.jar?guest=1
ENV SERVER_PORT=2333 \
SERVER_ADDRESS=0.0.0.0 \
LAVALINK_SERVER_PASSWORD=12345 \
LAVALINK_SERVER_WS_PORT=8080 \
LAVALINK_SERVER_WS_HOST=0.0.0.0 \
LAVALINK_SERVER_SOURCES_YOUTUBE=true \
LAVALINK_SERVER_SOURCES_BANDCAMP=true \
LAVALINK_SERVER_SOURCES_SOUNDCLOUD=true \
LAVALINK_SERVER_SOURCES_TWITCH=true \
LAVALINK_SERVER_SOURCES_VIMEO=true \
LAVALINK_SERVER_SOURCES_MIXER=true \
LAVALINK_SERVER_SOURCES_HTTP=true \
LAVALINK_SERVER_SOURCES_LOCAL=false \
LAVALINK_SERVER_SENTRY_DNS= \
LAVALINK_SERVER_BUFFER_DURATION_MS=400 \
LAVALINK_SERVER_YOUTUBE_PLAYLIST_LOAD_LIMIT=600
CMD ["java", "-jar", "-Xmx2G", "Lavalink.jar"]
``` @topaz fjord
teached
I'm making a command that uses snekfetch to search up weather through this website: ``https://api.openweathermap.org/data/2.5/weather?zip=`
It uses Discord.js
The current code is:
let zip = args.splice(0, 1).join().trim();
console.log(zip.length)
if(isNaN(zip)) {
message.channel.send("You need to put in a zipcode that's `5` numbers long!")
} else {
if(zip.length >= 6) return message.channel.send("The entered zip code is over 5 numbers long!")
const { body } = await snekfetch.get(`https://api.openweathermap.org/data/2.5/weather?zip=${zip}&appid=someStuffOut`);
try {
console.log(body)
} catch(e) {
const [information] = body.message;
if(information === "city not found") {
message.channel.send("Invalid zip!")
}
}
}```
splice 
hmm
Oh yea, the problem is:
(node:7160) UnhandledPromiseRejectionWarning: Error: 404 Not Found
at _response.transport.finalizeRequest.call.then (C:\Users\Ares\Downloads\Bots\newAresBot\node_modules\snekfetch\src\index.js:195:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:7160) 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:7160) [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.```
404 not found: not found
When a zipcode isn't correct
But I thought I had that problem solved using:
const [information] = body.message;
if(information === "city not found") {
message.channel.send("Invalid zip!")
}```
The easiest way to get around the issue would be using try and catch
Any One Have Special Code : js
Any Code Can Help My Bot To Be Better
sorry we don't spoonfeed, you'll have to make some code for your bot on your own
^
It's better for yourself to teach yourself because in the future that's gonna happen
O/
guild.channels.get(guild.id).send({embed: {
^
TypeError: Cannot read property 'send' of undefined
could someone help?
you need to get a guild channel, not just send to the guild with no channel to go to
@unborn stone
hmm
even if I do the ping command and it does message.send it doesn't work.
wdym "you don't have the code" 
@restive silo tank
back to csgo competitbe i go
owo
@trim plinth I'm on my phone 
yeah but without the full code I can't really pinpoint the error
guild.channels.get
so I need help
find a channel with channel id
yea
and your giving it a guild id
I'm curious how I would set my bot up to log a mod command with a number at the end (pretty much exactly as Luca does) and how I can add a command to edit that log (once again exactly as Luca does)
using a database
oh....if that's the case then I might not since it seems a little time and knowledge consuming
if it's easy to do then I probably would but otherwise, probably not
It's really not
CREATE TABLE modlog (case_id integer primary key auto increment , message_id bigint)
the basic way
is that JS?
It's as simple as storing the case number in a database
sql
oh boy
sql is a query lang...
^
type names might differ but you'd want 64bit number for message id
and 16/32bit number for case id
aye
ok...i'll sort this out then
I'll just stick to the method that I have already....which is to require a reason on the initial mod command 😂
Not intuitive :C
the logs are in a support server and no where else anyway so it doesn't really metter
see?
wait....that discriminator is very wrong
I must've fucked up on the discriminator formatting then 😂
CREATE TABLE `mod_log` (
`case_id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`message_id` INTEGER NOT NULL UNIQUE
);```
ofc
(which I guess in this case it is)
lol
Not good practice though for that
That's true 😛
@inner jewel Natan that AUTOINCREMENT wouldn't work if you use that mod-log for more than 1 server 
kk
not for copy pasting
tru
yea, my mod logs only work in my server, (the commands work in any server though) so it really doesn't matter....although when it's used outside of my server I would have to make an else statement of something like: The ban hammer has spoken...
Why not have mod logs for all servers? 
I just don't know the way to set up my database to let users set the logging channel
have an integer (in case of sqlite) field to save modlog channel id
oh ok
hmmmm....this might take some thinking....back to the drawing board lol
actually.....it might not....
Hi,
That's my Sequelize model:
const Sequelize = require('sequelize');
const Database = require('../structures/PostgreSQL');
let Feedback = Database.db.define('feedback', {
feedbackDate: Sequelize.DATE,
userID: Sequelize.STRING,
userName: Sequelize.STRING,
guildID: Sequelize.STRING,
guildName: Sequelize.STRING,
name: Sequelize.STRING,
content: Sequelize.STRING
});
Feedback.sync({ force: false });
Feedback.count = [];
module.exports = Feedback;
I want to get the feedback count and at every new feedback, thats make a new number.
I did something like that
const feedbackcount = await feedback.findAll();
const count = feedbackcount.count.length + 1
But feedbackcount return to an Array with length 0.
Somebody knows what I'm doing wrong ?
Can anyone with automatic role and checkguilds reach me specifically?
@abstract mango It's the copypaste thing that broke everything
ah
(node:7516) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND discordbots.org discordbots.org:443
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
(node:7516) 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: 1)
(node:7516) [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.
rs```
I just changed my bot's (@supple marlin) profile picture, then that happened.
tl;dr .catch(console.log) or something like that
(node:7516) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND discordbots.org discordbots.org:443
at errnoException (dns.js:50:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
this is what you need to look at
and yes
please do use .catch
it should use .catch(console.error) though
go = results[0].censor
if (go == '1') return;
})```
It keeps saying go isn't defined, idk...
hmmm. i wonder why... could you be assigning something to go that is undefined? maybe check that
INSERT INTO warnings (guild_id, userids, warnings) VALUES ("+guild.getId()+", {},{}); context
found it, it's '{}'
can someone help me make a nsfw command or hentai ( in java )
@spring ember do you know how do i make my bot search google for a image and then upload it?
not upload it but*
search how to do it in google
i did
use an html parser I guess
idk what that is
dude this is not the place for teaching
learn through the internet and I will help you with every problem you encounter
or other people here
ok
thanks for understanding
Hey
Language: C#
guys
for(int i = 0; i < Duplicated.Count; i++)
{
f(URLs.Contains(Duplicated[i]))
URLs.Remove(Duplicated[i]);
}
why this is doesn't remove duplicated lines
please help me
can someone help me
i have a problem
let msg = message.content.toUpperCase(); // This variable takes the message, and turns it all into uppercase so it isn't case sensitive.
^
ReferenceError: message is not defined
how do i fix it?
@spring ember sorry for the ping do you know how to fix it ?
well that is java
JavaScript != Java
javascript isn't java
well you said you use java
sorry I use java 😦
but I think you don't have a var named message
in your code
can you help me please
lol
Language: C#
for(int i = 0; i < Duplicated.Count; i++)
{
f(URLs.Contains(Duplicated[i]))
URLs.Remove(Duplicated[i]);
}
why this is doesn't remove duplicated lines
or types natan
then var?
right?
yes
even var Java doesn't have
nope
the problem is not let it is java
not java i mean message*
@edgy needle this is not Discord Bot List related
>type src\testing\Main.java
package testing;
public class Main {
public static void main(String[] args) {
var string = "hello world";
System.out.println(string);
}
}
>javac -d . src\testing\Main.java
>java testing.Main
hello world
j10 has been released
this month
why?
intellij doesn't support it yet
seems easier
at least not on ultimate
it's really pointless not to have it
var imo is a bad practice as you're not being explicit
It's better to be explicit about what you want
add const and let
but it is explicit
A type cannot
it just infers the type
but every function must specify its return type
Yeah and tbh it's better to infer the type
var x = 1;
x = "1"; //compilation error
it's rly great
X x = new X(); and var x = new X(); do exactly the same
you can only reassign x to a valid type
java's var just infers the type, it doesn't remove it or <whatever>
and it's 00:15 so
yes
programs C# so nty
more than half the bots here are js
btw don't ever do >help or !help as a joke, 20 messages on dms instantly
f-ing disgusting
var is good for long type names
what does the 422 error mean? I have not changed anything on my eval command but now I get this error when ever I try to use my eval command. I really don't know what type of stuff can cause that error.
422 Unprocessable Entity
The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions.
For example, this error condition may occur if an XML request body contains well-formed (i.e., syntactically correct), but semantically erroneous, XML instructions.
but weird thing is I have not changed anything in my eval command script lately
Well whatever you gave the "API" it says it's unable to process the instructions
Wondering why this isn't working like I want it to. Using Mocha + Chai.
(await REPL.execute('{ isAetheryxCool: true }'))
.should
.be.an('object')
.and.equal({ isAetheryxCool: true });
Returns:
1) execution
simple executions
AssertionError: expected true to be an object
Not sure why true is expected to be an Object - I just want the output to be an Object.
Hi,
That's my Sequelize model:
const Sequelize = require('sequelize');
const Database = require('../structures/PostgreSQL');
let Feedback = Database.db.define('feedback', {
feedbackDate: Sequelize.DATE,
userID: Sequelize.STRING,
userName: Sequelize.STRING,
guildID: Sequelize.STRING,
guildName: Sequelize.STRING,
name: Sequelize.STRING,
content: Sequelize.STRING
});
Feedback.sync({ force: false });
Feedback.count = [];
module.exports = Feedback;
I want to get the feedback count and at every new feedback, thats make a new number.
I did something like that
const feedbackcount = await feedback.findAll();
const count = feedbackcount.count.length + 1
But feedbackcount return to an Array with length 0.
Somebody knows what I'm doing wrong ?
can someone tell me whats wrong with this?
# Errors
@bot.event
async def on_command_error(ctx, exception):
if isinstance(exception, commands.NoPrivateMessage):
await bot.say('This command cannot be used in private messages.')
elif isinstance(exception, commands.CheckFailure):
await bot.say(noperm)
elif isinstance(exception, commands.BotMissingPermissions):
await bot.say("I am missing permissions :(")
everytime someone uses the kick command and they dont have permission this prints out in the console
Ready
ts kick @copper verge
Ignoring exception in on_command_error
Traceback (most recent call last):
File "C:\Users\Matt GT\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "C:\Users\Matt GT\Desktop\Discord Server\Tesla\bot.py", line 57, in on_command_error
elif isinstance(exception, commands.BotMissingPermissions):
AttributeError: module 'discord.ext.commands' has no attribute 'BotMissingPermissions'
@{GC} MagenkyouSharingan#3979 stop
pls help
with?
backread
@keen anvil do you know if the most recent issue by you in #267327844357636097 has been fixed?
Doubt it, just use lowercase
code?
code?
double check your code
shit
leaked auth
@app.route('/dblwebhook', methods=['POST'])
def dblwebhook():
if request.method == 'POST':
if request.headers['authorization'] == 'quadruplegay':
if int(request.values.get('bot')) == 399315651338043392:
upvotetype = 0
if request.values.get('type') == "upvote":
upvotetype = 1
else:
upvotetype = 0
# does some stuff with the data
return "OK"
else:
return "no u"
else:
return "no u"
else:
return "no u"```
there
i'm using flask
sorry this might be asked all the time but I can't find it.... where can I find my DBL token?
it’ll be at the bottom where u can either generate one or regen one
I thought it was account wide
boof
thx
Can't feed code but we can try
🤦
To mention Someone, you click their name
sad
Was that your problem @earnest phoenix?

also just to say, that's only on mobile

Well I will take leave then. Best of luck to you @earnest phoenix


Aye I need some help, it says "no module named discord", and I've run the pip install command and such. I dunno what to do, I'm new at this stuff.
^after typing a sufficient amount of code
what language+library?
python + discord.py i assume
yeah you can fix that by not using python
no u
hueheuheuhue
Aight thanks.

i was just joking im sorry

Anyone know if there's any way in c# to check when you GetOrCreateDMChannelAsync(); to see if you've created the channel or got it?
Who can help me ? I would make a bot and I'm french, It's hard and the Web site is in english
Where can I find a list of details that the discord api can get for servers and users?
Like channel count, ID, name, etc
Hmmmm, OK....Why is this: def setup(bot): bot.add_cog(GeneralCommands(bot)) print('General is loaded') Outputting with this: file: 'file:///c%3A/Users/jackg/Desktop/My%20Bot/generalcommands.py' severity: 'Error' message: 'E0001:unexpected unindent (<string>, line 182)' at: '182,1' source: 'pylint' code: 'E0001'
Heard of what?
but you can read the error message
def setup(bot): is never, EVER supposed to be indented!
That's why.....def isn't supposed to be there
IDK Why or how it ended up there but oh well
Wait no, never mind I was thinking of something else
I think ik why
await self.bot.create_role(name='Muted', send_messages=False, color=0xFFFFFF) Hmmmm, does this work?
Oh....ok...well....thanks....i'll head there then
what? no... @spring ember 
this channel was never restricted to js help only
@nimble merlin show full code hastebin.com
aye....hold on
amen that there's mostly js devs that's a true fact
but that doesn't mean there isn't python peeps hanging around here
lol
full code
^
as in the whole cog
dont need to put () around class definition :p
whats the error again?
I have an exception so there is no error message unfortunately
huh what?
yep
learn python
See? Nothing appeared in the terminal
and why are you asking for help here?
^^
Am I not allowed to request help?
why not the discord.py server dedicated to issues using d.py that you're in
did they tell you to learn python?
This isn't the JS Only Help Server
@spring ember whats the problem with asking here?
and if they tell you to learn python (im fairly sure they will), you should do it :)
you dont need 500 people helping one person right?
and is intended for help with exceptions
The description of this channel is: Channel for chatting about bot developmet. If you have any questions askt the questions and wait
yes
^ exactly
but that doesnt mean nobody.. theres actually quite a few
you can ask here but why?
I'm asking wether or not I provided the right argument fileds....is that not a simple question?
read the docs then
Yes, It just mentioned: **fields
yea, this isn't the testing channel
oh then it is most probably kwargs
hmmmm
like permissions=Permissions
I tried hmmm
look at the params from https://discordpy.readthedocs.io/en/latest/api.html#discord.Client.edit_role @nimble merlin
can u scroll down?




