#development
1 messages · Page 636 of 1
It would need their consent
2.2 Restrictions. You shall not, and shall not permit any person, directly or indirectly, to (i) reverse engineer, disassemble, reconstruct, decompile, translate, modify or copy the API or SDK, other than as explicitly permitted hereunder (except to the extent the foregoing restriction is expressly prohibited by applicable law notwithstanding this limitation), (ii) create derivative works of the API or SDK or any aspect or portion thereof, including without limitation, source code and algorithms, (iii) distribute or otherwise disseminate the API or SDK by any means or in any form, except as an integral part of your Applications; (iv) use the API or SDK in connection with any Applications that include any malware or other harmful code or that facilitate spamming in any way; (v) circumvent any limits or any privacy or access controls (or attempt to do so); or (vi) include any advertisements or other promotions within the functionality enabled by the API or SDK. Except as expressly set forth in this Agreement, Discord reserves all rights in or the API and SDK.
Integrate your service with Discord — whether it's a bot or a game or your whatever you wildest imagination can come up with.
hmm how would i be able to get an invite to join there server
Without consent? You wouldnt
i was going to make a roleplay pizza bot
why would you need to join their server then
That's like if Samsung or LG can barge into ur house without ur consent just cuz u own their tv
If for some reason you really need to, you can force them to accept a ToS before using the bot tho 
But I wouldnt accept that tos
ill work around it. its fine.
👍
then how do i do it in webhook?
Quick Q on BOT Rules.
Bots will be kicked from the server if they:
• Send join messages/mass messages/advertisements in direct messages
Does this apply if the BOT does a join message when it first joins a server?
And if that is fine, what is the common route of doing this? Just grabbing the first channel in the list and sending the greeting message there?
I'm pretty sure "join messages" means when u DM a new user who joined a server
And if u join a new server why would u send a welcome message in DMs
yea the initial join message from a bot doesnt apply
there isnt really a set method
some people do that
other bots look for a channel that has the word "bot" that they have access to
By "join" I believe it is technically in Discord.js terms called client.on('guildCreate'
and okay, thank you!
I just want to have it post a first-time join message about itself and how to see the command list
wUser is not defined @rugged kelp
Yes
make sure you typed it correctly
How to fix ?
and that you have wUser = something
This is the code
warn.js
it goos
here
is not good on warnlevel.js
@night imp
use await on line 13
let wUser = message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0])
@night imp
this is the error
you defined wUser and you used it after the line where you defined it
duh
you can't to this
console.log(e)
let e = something
put that if statement somewhere below line 13
@rugged kelp
this console.log(e) let e = something ?
put the if statement below line 14
if (!warns[wUser.id]) warns[wUser.id] = {
warns: 0
};
put that below line 14
Yes
ok
this is logic order, you can't have something that doesn't exist
like what you did
No : (
hmm
Im from Romanian
nice
nice
leave the if statement below the line I told you
uups
1 sec
oof
@earnest phoenix stop leaking your token, just leave it blank when asking for help
import net.dv8tion.jda.core.accounttype;
import net.dv8tion.jda.core.JDABuilder;
import javax.security.auth.login.LoginException;
import jdk.nashorn.api.scripting.JSObject;
import jdk.nashorn.internal.objects.Global;
import jdk.nashorn.internal.runtime.ListAdapter;
public class main extends ListAdapter {
main(JSObject obj, Global global) {
super(global);
// TODO Auto-generated constructor stub
}
public static void main(string[] args) throws LoginException {
JDABuilder builder = new JDABuilder(accounttype.bot) ;
String token = "K" ;
Builder.SetToken(token);
Builder.addeventlistener(new main());
builder.buildAsync();
}
@Override
public void onMessageReceived(MessageReceivedEvent event) {
system.out.printin("We Recived Message From " +
event.getauthor().getname() + ": " +
event.getMessage().getContentDisplay()
);
if(event.getMessage().getContentraw().equals("!ping")) {
event.getchannel().sendmessage( "pong!").queue();
}
}
}
@warm flame The token is still in #265156361791209475 can u delete the messages?
Let them regenerate it
¯_(ツ)_/¯
deleting messages in bot-hell is as useful as trying to dry an ocean with a lighter
lmao
pretty much, already told them to regen it in #topgg-api when they first leaked it
¯_(ツ)_/¯
the messages you delete in bot-hell get logged as well
and you'll have to keep going until the messages get too big to send
ye, easier for him to just regen
I'm doing my homework so I'm not really paying attention to what I do ¯_(ツ)_/¯
Post your question
]]ask2ask
Dont ask to ask
Just ask your question
it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time by just asking the question.
you are sending an empty message. console.log if what you are sending is actually defined or not undefined
ofc your send message cause it cant send an empty message
yeah defined by variables
but is that defined variable have a data?
comment out all send message calls and uncomment them one at a time until you see which one causes it
defined variable !== data in variable
make sure that variable you are sending isnt undefined or null
await those if you want to wait for it before proceding
Does anyone know how to connect your program/script with the bot
rest, websockets
?
thats some ways you can connect your script with your bot
So where do I stick the script?
first of all what is this script first?
A paypal invoice script that makes invoice
Im saying websocket and rest if the script is something like a stuff coded in another language
The bot will send invoices
How do you run it on your bot but have no idea on how you connect it?
is it a process separated from your bot
Yes
if its a process separated from your bot
you need to make a "rest" or "websocket" server
where in that will run in your local host
when an invoice is received, send the data via the websocket connection if you decided to use that
then your bot will receive the data then send it
ok
I would find vids on how to create it then, I hired a dude to make a script that could send invoices, but he didn't clearly explain what I should do
good luck
Yeah, and non of the video is helping...
I cant expect you to learn about websockets at first but start with a simple one
https://www.npmjs.com/package/ws
here is the ws Client and Server package
there are examples there
Maybe if I show you the script will it be easier for you to help?
This is what everything the developer provided...
I cant code a ws server nor a ws client for you @earnest phoenix due to the ff reasons
- I have my own responsibilities to work on
- It's not as fast as you think and it can be time consuming
- You can learn it with yourself if you only have the will to do so
First thing is first, why not view the source code of the Invoice Bot and check how he sends the invoices?
If you know that then you can start on doing the WS server
then on your another bot, make a WS client
But it react on commamd
because you are telling the code to react on command
How to react on bot message
msg.channel.send() returns the message sent by bot
@earnest phoenix hay give me link https://cdn.discordapp.com/attachments/272764566411149314/590035085252886589/unknown.png website
and its a promise
Ok
make it react on the sent message in msg.channel.send
or if you are that oppossed on making a ws server and client then hire a developer
Unexpected token
means your syntax is wrong
Hmm
do you know how promises work?
try learning basic js before making a bot...
do a free online course or guides
msg.channel.send is a promise
look down on promise consumers
thats how you deal with promises
no
oh god
open that link
look down on promise consumers
thats how you deal with msg.channel.send promise
the syntax is there
all you need to do is a little analyzation so you would learn
msg.channel.send().then(msg => {
msg.react
})
there you got it
yea
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise another link that might help you
Ok
also do you know what async is?
might make ur code more tidy
if u use async/await
yes it does. if you're fine with that that's fine
anybody using canvas ? can you guide me on how i can load custom fonts ?
@queen bone what languages
js
use canvas-constructor is better than canvas
i want this https://fonts.googleapis.com/css?family=Audiowide font in my text
Yes
ok but how do i add any fonts, i want beautiful fonts
Look canvas documentations 
What u use canvas or canvas constructor
he use canvas i think
Hi
Success menjs Canvas.registerFont('Audiowide-Regular.ttf', { family: 'Audiowide'}); ctx.font = '50px "Audiowide"';
Ok
@queen bone discordjs?
yes men
You can use canvas-constructor is better than normal canvas
It works like an embed
Like
Its better
yes i saw its easier than canvas
How can I fix the error “Something took too long to do”? It seems like the error came from the login function. Lib: d.js
@earnest phoenix you have forgot to clear a interval or something
or a timeout
I dont think thats interval or timeout
it pretty much means something got stuck and d.js cancelled it
i saw setTimeout in the error
but I can’t edit it as the code is in the d.js file
you dont need to fix that
some errors just happens
unless you have a really bad code
just handle the error pretty much
internet is a scary place
everything will not work perfectly lmao
thats why you handle it
will be fine by itself after some time?
if it happened on client.login() then I would prefer to restart the bot and try again
if you run your bot with pm2
the error happens again
a simple process.exit() will do if client.login errors
then check your vps or provider
maybe the connection
if you are hosted on glitch or heroku
then thats your problem
free hosting is not for public services so either you pay or suffer on that error again and again
ok then
there are tons of cheap servers out there
any example for cheap vps that I can afford with $10.
https://contabo.com/?show=vps
I always recommend them for new developers thats in need of cheap servers
Powerful VPS hosting – SSD storage, snapshots, virtual machines equipped with brand new hardware, 100 mbit/s unlimited traffic, starting at just 3,99 EUR/month.
VPS S SSD is a great value for its price
Potato approves
ok then guess i will find something else
use aws free for a year
Should I get Linux or Linux KVM?
ok thanks
Anybody know how i can make the reddit api's "random" feature return an image?
https://reddit.com/r/memes/random.json if its an image, the url will be an i.redd.it link
if its not an image it should be the link to the post
@nocturne hazel ^
Ok. But how can you pull the data itself?
use an http library to make the request, and use JSON.parse() to convert it to an object
any library that can make an http request would work
which one you use depends on your use case and preferences
Yes
ik
then why did you ask
we dont spoon-feed here @rugged kelp
Ik sorry :>
hey guys
i have a problem with my dm code
it sends a message to a certain user from the server
not mass dm ofc, just a message
and it always sends like this weird id or whatever it is in front of the message
like this one
this is the code
case 'dm':
if (!message.member.hasPermission("MENTION_EVERYONE")) return message.reply('Nu ai permisiuni')
msg = message.content.toLowerCase();
if (message.author.bot) return;
if (!args[1]) return message.channel.send('ce? cine? cui?');
mention = message.mentions.users.first();
message.delete();
mentionMessage = message.content.slice (9);
mention.sendMessage (mentionMessage);
message.author.send ('gata!');
break;
The ID at the start is how the bot tags someone
and can it be removed?
But the id isn't in full by the looks of the image
yes 18
discordjs
Isn't sendMessage dep?
No its .send
Yes
if (!message.member.hasPermission("MENTION_EVERYONE")) return message.reply('Nu ai permisiuni')
msg = message.content.toLowerCase();
if (message.author.bot) return;
if (!args[1]) return message.channel.send('ce? cine? cui?');
mention = message.mentions.users.first();
message.delete();
mentionMessage = args[1].join(' ')
mention.send(mentionMessage);
message.author.send ('gata!');
break;``` @earnest phoenix
I have changed the mentionMessage
won't change the error.
Ok
TypeError: args[1].join is not a function
Yeah
remove mentions from args
messageToReply = args.join(' ').replace(/\<@\d+\>/, '');
so returns a string
I started using Java Scripting. Anyone has the script to start with?
i am new in coding and a little stupid
i did this
case 'dm':
if (!message.member.hasPermission("MENTION_EVERYONE")) return message.reply('Nu ai permisiuni')
msg = message.content.toLowerCase();
if (message.author.bot) return;
if (!args[1]) return message.channel.send('ce? cine? cui?');
mention = message.mentions.users.first();
message.delete();
mentionMessage = message.content.slice (message.author.id.length + 3);
mention.sendMessage (mentionMessage);
message.author.send ('gata!');
break;
Works?
lmao
don't use message.content
case 'dm':
if (!message.member.hasPermission("MENTION_EVERYONE")) return message.reply('Nu ai permisiuni')
msg = message.content.toLowerCase();
if (message.author.bot) return;
if (!args[1]) return message.channel.send('ce? cine? cui?');
mention = message.mentions.users.first();
message.delete();
mentionMessage = args.join(' ').slice(21);
mention.send(mentionMessage);
message.author.send ('gata!');
break;```
or replace with regex
your choice.
For the spaces?
you still using message.content?
What's your prefix?
because it has to delete Vdm @daring fjord message
it has to delete Vdm @daring fjord
that's why should use your args array
args.join(' ') should be the mention @daring fjord and message
without prefix and command name Vcommand
yeah i get
@warm marsh Romanule : )
Romanule ?
Where are u from ?
Scotland.
OK : )
@warm marsh Java Script
I need the scripts I must start with ( aka enter bot token and informations )
if you need your bot's token go here https://discordapp.com/developers/applications/
Integrate your service with Discord — whether it's a bot or a game or your whatever you wildest imagination can come up with.
I know how to get token, just looking on how to start with js
@modern sable
tf
@elder veldt fucking stop
is this api abuse ? ``` for(let channel of guild.channels.array()){
channel.overwritePermissions(/blah/)
}
One message removed from a suspended account.
One message removed from a suspended account.
hmmm
Of course it would be API abuse. You're granting a bot with permissions that they have not been given and there is obviously a reason as to why they do not want the bot to have those permissions.
if it's every server, yes it's abuse, if it's your own server or one you were given consent to do that in, sure you can do it
If you were given consent, just tell them to give the bot administrative permissions to save yourself the effort.
TRENTToday at 4:04 PM
Of course it would be API abuse. You're granting a bot with permissions that they have not been given and there is obviously a reason as to why they do not want the bot to have those permissions.```
that's malicious intent, not api abuse
it really depends on the context
One message removed from a suspended account.
e.g it's acceptable when creating a mute role and you need to update permission overwrites on channels
otherwise, probably not
One message removed from a suspended account.
One message removed from a suspended account.
no, he's doing that with every channel of the guild
my code contains that too, for mute roles
One message removed from a suspended account.
the code shown does it in only one guild
One message removed from a suspended account.
doesnt say he is
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yes that's how you change permissions
One message removed from a suspended account.
no? not really
my code for creating a mute role, it isn't malicious intent
neither is the code above
That's for a muted role which the bot creates. It would be different if the bot was granting itself permissions that it has not been given.
I doubt they had any malious intent speaking they asked if it was API abuse
Who said he was giving his bot permissions, He could just be overwriting permissions for a role aka muted
does someone have an example on how https://dblpy.readthedocs.io/en/latest/api.html#dbl.on_dbl_vote that listener works ? i may just miss a detail lol
When your webhook is running, that event will be emitted once someone has voted for your bot
rn i have something like this, but idk how to register my on_dbl_vote function to be linked to the dblpy.on_dbl_vote event
It is already registered
but it isn't working
Are you sure your port is open and you are forwarding it?
gonna check out
How to add background in my bot list ?
Add CSS to the long description.
<head>
<style>
p {
color: red;
text-align: center;
}
</style>
</head>
<body>
<p>DSJDAJDFJDSA!</p>
<p>These paragraphs are styled with CSS.</p>
</body>
</html>
With this ?
Yes now why'd you use a template from w3
Not exactly gonna work on dbl but mk
I would just write your desc in plain text before doing html tbh
I'd really suggest learning HTML before using it on your bot page tbh
^^^ please
🤔
Oh my fucking God close those paragraphs
At least they figured out a bad way of doing newlines...
https://www.codecademy.com/learn/learn-html please @rugged kelp
@west raptor hi, I updated @steep mist to not respond to bots
okay
I think you can unmute it now
Roman copying code won't help you
It's like copying a sentence from another language and you don't understand it
please just read some guides and tutorials, we won't hold your hand in helping you make stuff
: (
I just realized how dumb I am
All I needed to do was run my bot from the bot's directory...... hh
Hoist
English please
If your issue is not related to any development, move to #general or #memes-and-media
his husband is thanos
Let's move it to #memes-and-media
yeet notr
(javascript) how do I check if an array constains a string?
Check if number string is in the array
Array#includes?
if (1 in zahl)?
array.includes ig
Hey !
Somebody knows how to create a website using discord.js
You can't create a website using a language for Discord :/
You can, however, create a website with JS but you would need HTML as well.
idfk
i have a friend who has done that for fun but how !
https://dashboardtest.marco-dev.fr/
That isn't much of a website.
But how can i do a website like that
I know for that but using discord api
If you want to do a website exactly like that, it's really simple xD
What is that so ⬆
I'm french so if u can stop to use abrevaitions 😅
Nope
For the moment i d'int host it
You can't write a website in discord.js
^
It's a language for Discord, it's even in the name.
Ye
Js, java, node, etc
html/css your way to websites
Yeh
node/library is the same thing, I thought. Anyway, you would need to use HTML and CSS for a website. For something more complicated, you can use JavaScript as well.
html is ez
Everyone has their strengths
</html>```
hyper text markup language
Hyper text markdown language
Any help u want
YEAH
<!DOCTYPE html>
<head>
<script></script>
<style></style>
</head>
<body>
<p>Text, and other stuff</p>
</body>
</html>
Hi guys
I made my own database just with text files and it works good
if anyone wants the code just tell me
what is this for <!DOCTYPE html>?
no
,me wanna code
for discord.js
mean?
w3schools.com did u make this?
my name is not w3schools
you said you want to code, so I gave you the link https://w3schools.com
i know how to code an html document
nice
wut the webpage looks intresting
I didnt code that
Hello How Can I Put My Bot Into The List?
using a txt file as a database is an awful idea
sqlite is local and works way better
I got so many errors and bot crashes using .txt files but its all good now
also why is it a bad idea to use .txt files
first of all, are you using node.js and fs
becuz it is
c o r r u p t i o n
fs will corrupt your files if you try to read and write at the same time, which is extremly likely to happen with a discord bot
yes
If anything, i make my code write files, then read them
for example, if I want to warn a user, I give the username as an argument, then my program names a text file to that user, and adds text to it
its temporary, don't worry
i wonder if using something to queue reads/writes would get around that
oh i see. So you are saying that if someone in another server were to try to warn a user and I would try to get that user's warnings, the bot would crash?
no
im saying is that if you fuck up async code and make fs write and read a file at the same time, it will corrupt it
async?
i dont know about file reading/writing in general and i should probably learn more about it, but in theory queueing them should work
asynchronous code
oh ok
i highly suggest you watch this great video by Fireship, explaining what async/await is
The await is over! Learn how to make your JavaScript Promise code beautiful and concise with async-await https://github.com/codediodeio/async-await-pro-tips ...
yes, its not a simple thing
i reccommend you write very little code at first (10 lines max) to understand it
and just experiment it
its definitely the best practice for learning any new concept
I'm not that advanced. I still don't know a thing
Is it ok if i DM you my code with text files
i cant help right now, sorry
are you on mobile
k
Ill just dm you so I don't forget. You probably know this stuff way better than I do
I am very new to this API thing, is it possible to use this https://any-api.com/rottentomatoes_com/rottentomatoes_com/docs/API_Description in discordjs, if yes then where and how should i start ? any help is greatly appreciated.
you can literally use any rest api with nodejs
get an http library, make a GET request to the api, and parse the returned data
thank you very much , now i will dig into it
Why can't I have a single prefix? 
Wdym?
Share your code then
bot.on('message', message => {
let args = message.content.substring(PREFIX.length).split(" ");
switch (args[0]) {
case 'ping':
message.channel.sendMessage('pong');
break;
further down are other commands
you're not checking if a message starts with your prefix
should i make a
if (!message.content.startsWith(PREFIX)) return;
``` ?
ye
yes, thats one way to do it
Thank you
How to code a discord bot?:
1) Choose the language you already know or you will learn to not search on google or development.
2) Code your bot using libraries.
:D
CODE: https://hasteb.in/wasitusi.js
The command works completely but I do not want the bot win. Has anyone an idea?
document.onkeydown = function (event) {
var key = event.key
switch (key) {
case "1":
alert('test1')
case "-":
alert('test2')
case "*":
alert('test3')
}
why this don'T works for me anymore?
I have it, thanks
has anyone actually managed to corrupt a json file with fs on purpose? if so can i have some example code for uh reasons
just write to a file multiple times simultaneously
i've corrupted it not on purpose lmao
dont do what
use a json to store data
not planning to
if you throw an error in there that breaks the json object, fs will write an empty file
thats what happened to me
if writeFile gets an error i log it and do a process.exit()
but the thing is i literally cant get it to break with who knows how many thousand read/writes
regardless if anyone has a js script that can corrupt a file with writeFile/readFile with 100% reliability, please tell me
Code: https://hasteb.in/depizake.js
How can I write that if the winnerCount is smaller than the people who reacted (- 1 because the bot should not be winner) then comes a message
oops haha
Is making a method in a class async valid?
language?
^You just can't have an async constructor I believe
class myClass extends whateverTheFuck {
constructor(idk) {
this.idk = idk
}
async returnThatValue() {
//do async stuff
//oh yeah, and also return that value
return this.idk
}
}```
coolio, thank you
I have a quick and maybe stupid question, but when making a discord bot should I use the delete() function tol remove parsed JSON data after the info is posted, or does this have any impact on the bots ram usage?
it seems like the longer my bot is up and running the more memory it uses
so if theres a better way at reducing it, the help/tip would be appreciated 😃
shops = {'>balloon stall': {'file': 'tbobb/balloonstall.txt', 'title': 'Balloon Stall', 'color': discord.Color(0xff8888)}, }
if mcontent in shops: print(str(shops[mcontent['title']]))
Traceback (most recent call last):
File "C:\Users\rcfra\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 227, in _run_event
await coro(*args, **kwargs)
File "C:\Users\rcfra\AppData\Local\Programs\Python\Python37-32\tbobb.py", line 123, in on_message
print(str(shops[mcontent['title']]))
TypeError: string indices must be integers```
mcontent is a string
what should it be?
a dictionary
shops[">balloon stall"]["title"]
can i do shops[mcontent]["title"]?
yeah that should work
ok thank
Is jshint integrated with VSCode?
And if anyone knows, how do i disable it?
whats the best way to send a message to a certain channel (by channel id)
Lang?
javascript, using discord.js
i tried using this client.channels.get(channelID).send(Text)
but nothing happened when I swapped in my values
you did .get('123') and not .get(123) right?
yes its in quotes
If there was no error and no message the code didnt run
yeah, thats what im thinking now, but im confused as to why its not
a linter might help https://discordjs.guide/preparations/setting-up-a-linter.html
the only reason im confused is because all my other commands work, but i copied and edited an existing one to change the message, no error when its loaded or anything either
Otherwise you can also show your code and let us have a look
the bot has permission to see the channel?
@warm marsh bots can see this channel, just cant talk
Wasn't talking about this channel...
Was talking about the channel they're having issue with
yes it has access to it
Sry i cant read i thought you said this channel
But if it wouldnt have perms it would throw a discord api error
Wanna show your code
one second
You should put a console.log in the command to verify that it does actually get loaded and ran
it does, it loaded the command fine, but never would run it, i got it working now, im not sure what I changed it anything
thanks for the help guys!
Does anybody know how to explain async
Go bake a pizza, then get me a glass of water
VS.
Go put the pizza in the oven then get me a glass of water while it bakes
The pro player takes 10 seconds to think of a move while the other players each take a minute
So instead of playing each player till the end of the game they would move to the next while the other player thinks of a move
Takes less time
Async in a nutshell
@scarlet phoenix okay, that is honestly the best explanation ive ever seen, not just because it includes pizza
oh ok
Well yeah same thing. I made it harder on myself explaining it 
Lol i heard it somewhere way back like 10 years ago or something
Im like in middle school and im trying to cram all of this in my brain just for the fun of it
It hasnt aged one bit
yeah that one lol
quick question to devs that deal with reactions on embeds -
My bot has a feature that requires it to delete reactions Im getting this:
(node:9231) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
but when I go into the permissions on my server the manage reaction switch is on
hey guys, i have an interesting question: im experimenting with image compression for discord and the tradeoff is basically twice the time to send for 3-4x lower file size.
not compressed -> image size 230kb, time to send ~350ms, total time to send ~350ms
compressed -> time to compress ~400ms, image size 61kb, time to send ~250ms, total time to send ~650ms
which one would you pick?
true, but it kinda takes away the feeling of a "blazing fast bot"
lmao
but yeah, im probably gonna move to compressed
if its under a second its fine
im a performance addict
I need a little explanation for promises
so whenever I get a promise rejection warning, I may be able to resolve one by 'faking' the promise
o wait nevermind
ayyy how do u run lua on windows
how much time did that take you to make
idk and i installed lua but it still says lua: command not found
did you restart your pc?
i dont know if i installed a correct thing or not
seems correct
but it didnt had anything about path
question:
can someone invite my bot to their server by modifying the bot invite URL to have "permissions=0" on the link instead of the permissions the bot requires
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luaforwindows/LuaForWindows_v5.1.4-46.exe this is what i installed
thus having the bot in their server without the proper permissions?
i found this
this is listed in the lua official website
@pale glen yes
seems to be basically the same thing, it does say it includes a bunch of shit, even a lua editor lol
anyway try restarting pc
message.channel.awaitMessages().then(collected => {
collected.first().delete();
}
``` Does this deletes the first message it collected?
@quartz kindle THAT didnt help
Ops caps sorry
command not found
wierd i had to do lua.exe main.lua
I'm supposed to get 233168, but I'm getting 234168, off by 1000. Ruby Code: ```rb
sum = 0
i = 0
until i >= 1000
i += 1
sum += i % 3 == 0 || i % 5 == 0 ? i : 0
end
puts sum```
Ok I figured out what's wrong... it worked fine after I changed 1000 to 999... but why tho?
just remove the = before the 1000 @opaque eagle
you want up to 1000 but no including it
wait
Did that, still the same problem```rb
sum = 0
i = 0
until i > 1000
i += 1
sum += i % 3 == 0 || i % 5 == 0 ? i : 0
end
puts sum```
Also idk how that would help, since that would count 1k
i = 1000 is not the same as i == 1000
youre true
Also quick question, would you say go is faster than ruby or vice versa?
I have a question. On the github documentation for the d.py lib of dblpy on the webhook example i was wondering if you NEED py self.dblpy = dbl.Client(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000) in order to use py @commands.Cog.listener() async def on_dbl_vote(self, data): logger.info('Received an upvote') print(data)? I only ask this because on the without webhook, the on_dbl_vote() isn't on there.
If you don't specify port, the webhook won't start
So you need a webhook in order to get information like on votes and stuff?
Webhook will just receive the vote info when someone upvotes your bot

ayyy
One message removed from a suspended account.
One message removed from a suspended account.
edit your bot's invite in edit
Awesome found it, thanks
- Wrong channel
- Up to a week, can be two
btw he should know he already got bot developer role
hey guys i'm trying to make a tic tac toe game in python and i'm wondering how one makes a check_win(board, marker) function?
for a 2d array
huh
tic tac toe is finite and really small
just hardcode all the win scenarios
assuming board is :
123
345
789
wins are 123, 345, 789, 137, 248, 359, 149, 347
check if all of those squares contain the same symbol: O or X
if one of those combinations do theres a winner, otherwise there isnt
.get("https://official-joke-api.appspot.com/jokes/random", { 'headers': { 'user-key': "" } })
.then(res => {
console.log(res.data.setup + res.data.punchline)
response = res.data.punchline
})
.catch(err => console.log(err))
``` how do i do header userkey help
just use superagent
let txt = (await superagent.get('https://official-joke-api.appspot.com/jokes/random')).body.setup;
let txtt = (await superagent.get('https://official-joke-api.appspot.com/jokes/random')).body.punchline;
you don't need any of that stuff
just this and you're good to go
well really theres only 8 ways to win, if your playin on a normal 3x3 board, and if you set each square to a number then it should be super easy like
ik this is in like js form, but i assume its the same style-ish
if (win = '123') return 'you won'
if (win = '456') return 'you won'
if (win = '789') return 'you won'
if (win = '147') return 'you won'
etc
lol me and shakyra had the same idea lol
um lil late tho
i am using this
https://any-api.com/oxforddictionaries_com/oxforddictionaries_com/docs/_entries_source_lang_word_id_/GET
i type https://od-api-demo.oxforddictionaries.com/api/v1/entries/en/hello and nothing happens
message.channel.awaitMessages()
.then(collected => {
collected.first().delete();
});
``` Does it delete the first message is collected?
@copper cradle that link was for testing
Im making a game data website
Where you can see the data of game how good the game is m stuff
@queen bone if u figure out oxfords api tell me how u did it
sure will
Lol im using other api rn its bad
Is there a way to see what place your bot is in the tags?
Tags?
not everyone will give your bot perms
i just started it tho, and it instantly spammed my console
it means your bot has no perms somewhere
i need to get a servers cmd so bad
its like you are trying to do somethinf you cannot do
for example you do msg.channel.send() on a channel your bot cant send message to
ofc that would spam that
Add console logging to see which server is running the command
TypeError: Supplied parameter was neither a Role nor a Snowflake.
at GuildMember.addRole (C:\Users\benta\Desktop\BubbleBOT\node_modules\discord.js\src\structures\GuildMember.js:454:38)
at module.exports (C:\Users\benta\Desktop\BubbleBOT\Events\guildMemberAdd.js:5:10)
there you have the error
Events\guildMumberAdd line 5
add a null check
not the error
it clearly says TypeError: Supplied parameter was neither a Role nor a Snowflake.
yeaah thats fine
It simple mean your bot don't know when to add role and when to welcome
it does
Nope
Hmm
yeah
its not because it works on your server means it will on others
No command and no variable
im ading things slowly
i had to re write it
since it was being a turd
anyways thanks for helping
good luck for main mod dude
and check if you can actually do it
Does anyone here know the insides of ML? I was trying to make a model based on spam links yesterday but Node got very slow and i now need to implement it in a faster runtime which has no libraries for that
thank you 
np
ml?
can i use author in awaitmessages?
Weeb is good
Machine Learning
yes on paramaters of await messages
dang
unfortunately I dont work with AI yet
so I cannot help you on that part
but if you just want to avoid spam bots
you can analyze their name and the message they send
well, hello @earnest phoenix




