#development
1 messages ยท Page 468 of 1
Hi, ฤฐm usind NodeJS discord.js. How i can get message guild owner id ?
@primal ferry msg.guild.owner.user.tag
thanks โค
no problem ๐
you're going to need to tell us more than that
So I coded it with discord.js
And After i installed the packages
it all crashed
and wont respond
after manual reboot
No Errors
@gilded blaze So My bot wont respond to any messages
exact same code on my other bot (
Show the code where it should respond to messages.
which?
Where you receive the Message event and try to respond.
I don't think system is a property of the Message object.
its not
Unless you set it.
Check that all the if statements that return are actually working.
it tells if it was a discord message (e.g. clyde)
It works perfect in my Other bot but not this bott
Is it actually logging in?
Ye
Its logged inj
[2018-08-21 23:02:32]: READY [READY] Sunrise#4622, ready to serve 59 users in 1 servers.
1534892686590 Ping Received
1534892829391 Ping Received
1534893108395 Ping Received
Oh so you are receiving.
Show where you are logging Ping received.
Gateway I'd assume
client.login(process.env.BOT_TOKEN, {fetchAllMembers: true});
};
oh
const http = require('http');
const express = require('express');
const app = express();
app.get("/", (request, response) => {
console.log(Date.now() + " Ping Received");
response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
http.get(http://${process.env.PROJECT_DOMAIN}.glitch.me/);
}, 279000);
Umm that is express.
ye
oof glitch

You're not telling it to send a message. Just sending 200 response code.
Na. I don't really know how to fix ur issue
o
can i get some help with eris?
?
Hi how can i send timed message ? with discord.js like : this message will be delete in 5 seconds
msg.channel.send('this will self destruct in 5 seconds').then((m) => {
setTimeout(m.delete, 5000);
});``` I believe should work @primal ferry
lmk if it does or doesn't
you'd probably have to m.delete.bind(m) or () => m.delete()
^ listen to aeth not me lol
a bot is only as smart as its creator
@zealous veldt m => { m.delete({timeout: 5000}) } or m => { m.delete(5000) }
the latter I believe
Hello im wondering if somebody can make me a bot
Just a bot who recognizes me and my friend kassandra and says Hey Kassandra And Alex! How are you today
And they'res a cmd that says
!Good !bad !Amazing
aaaaa
i cant see m ymouse
do it yourself buddy
wwwwwwwot
i cant see my mouse
my pc is lagging
i dwnloaded the coding program
i cant see my mouse now
wtf
I CANT SEE MY MOUSE
not related to #development at all
again, still not related to #development
Idk
but my mouse
isnt on the screen
aaaaaa
i downloaded
the coding software
thats all
Go to shitpost please
no dont polute shitpost with him pls
moose, you too
k
Hmm
That was interesting
hey, im using discord.js
cool
i want my bot to set pUser = message.author.id if anything other than a member is mentioned
and if a member is mentioned pUser = message.mentions.members.first().id
nothing i've tried seems to work
if(message.mentions.members.first()) do the thing else do the other thing
return before the else thing aswell
also be aware that the mention might not be correct if you allow a mention prefix for your bot
Is there a way to do what splice does in JS but in Java?
Collections.addAll I think
but for a string[]
use lists then
lists?
call me on Discord
how would i implement the api, so i need to post every whatever minutes or does the dblapi.js library do it for me
lib does it for you
make your own lib if you want a lightweight implementation, or use dblapi.js
is there any example of write and delete one message after a few seconds?
thnx
that will delete immediately and they will come back asking how to make a delay 
yes
actually djs is holding your hand so you can just do m.delete(5000) and djs would delete it after 5 seconds
i make the delay
but now dont work
oh ty
fully working
what can i do to solve that?
int value should be less than or equal to 100.
what are you Exactly doing
u cannot do that
if you want to delete more than 100 messages
maybe do it on a loop
ty
other thing
and to delete all messages?
any example like
while(still exist messages){deletemessage;}
anyone?
so what should i do?
delete messages with a loop
ok i dont get it i will search on internet
ยฏ_(ใ)_/ยฏ
it simple dont delete anything
async () => {
let fetched;
do {
fetched = await channel.fetchMessages({limit: 100});
message.channel.bulkDelete(fetched);
i = i + 1
}
while(fetched.size >= 2);
}```
You want to delete all messages?
yup
and how to get the channel infos
and recreate it
with same premissions
and same name
and same shit
its in the library docs
what if there is no manage channel perms
yup
then do the other method
anyone can ajust the code?
let fetched;
do {
fetched = await channel.fetchMessages({limit: 100});
message.channel.bulkDelete(fetched);
i = i + 1
}
while(fetched.size >= 2);
}```
no
ok so im fucked
Hi how i can do a cooldown with discord.js ? like;
Starting in 3 second
Starting in 2 second(edited)
Starting in 1 second(edited)
try a setinterval function for the function to repeat time and then decrement every function call
idk i dont code in js
or a setTimeout with .then() blocks
msg => {msg.edit("Starting in 2 seconds")}
)```
i can do edit with this
but i cant did 1 second
msg => {setTimeout(function(){msg.edit("Starting in 2 seconds")},1000)}
msg => {setTimeout(function(){msg.edit("Starting in 2 seconds")},1000)}
I need some help with people having to react to a message to get a role
So how can i edit message with Starting in 1 seconds ๐
I assume put another .then() on the edit, but I don't do JS
yes, another .then() after the msg.edit
โฌโฌฮนโโโโโโโ-
uhh #memes-and-media?
Can someone tell me how to write a <h2> for DiscordBots markdown? It won't work for me somehow..
<h2>RoleManagement</h2>
Does not work for me
At least in Preview all Text between h2 is not visible
Okey ๐
Nope still.. The first h1 works well, but anything else is broken somehow
Well problem solved...
http://prntscr.com/klo0ta
Dark mode is not supported here ;D
Yes it works, but as soon as I enable dark mode i dont see it anymore, thats what i tried to highlight by marking it.
you can make the text another colour
the HTML does support CSS ๐
Unsure if I should. I think I'll wait until approval and check again if the Dark-Theme bug was fixed. Then I can edit my page again.
thats how other bot pages have their fancy iframe setups
they just plug their code into the detailed description
and then add js and get removed
111
-bots @latent heron
This user has no bots
REEEE
any C# discord libs
besides discord.net
d#+
thx
omfg how do I fix this it crashes my bot ever hour
https://i.imgur.com/eWcwXyq.p
<Client>.on('error', (err) => {
console.log(err)
})
sup
@earnest phoenix put this in your main file and wait for it to come back
i do use google
i just was doing something than a warning thing appeared idk if it is discord or what
Is there a bot that can make role color rainbow
no
I've heard of bots that can do it
can someone explain me what this js function do?
function sdt(){var n=new Date,i=new Date(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()).getTime(),t=countDownDate-i,r=Math.floor(t/864e5),u=Math.floor(t%864e5/36e5),f=Math.floor(t%36e5/6e4),e=Math.floor(t%6e4/1e3);document.getElementById("days").innerHTML=padLeft(r);document.getElementById("hours").innerHTML=padLeft(u);document.getElementById("minutes").innerHTML=padLeft(f);document.getElementById("seconds").innerHTML=padLeft(e);t<0&&(clearInterval(x),document.location=document.location)}
did you try running it
probably wants to know what it does first
oh yea
before he runs it
maybe format it too lmao
yea
is from this page http://www.7265646d6f6e6b6579.com
function sdt()
{
var n = new Date,
i = new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes(), n.getUTCSeconds()).getTime(),
t = countDownDate - i,
r = Math.floor(t / 864e5),
u = Math.floor(t % 864e5 / 36e5),
f = Math.floor(t % 36e5 / 6e4),
e = Math.floor(t % 6e4 / 1e3);
document.getElementById("days").innerHTML = padLeft(r);
document.getElementById("hours").innerHTML = padLeft(u);
document.getElementById("minutes").innerHTML = padLeft(f);
document.getElementById("seconds").innerHTML = padLeft(e);
t < 0 && (clearInterval(x), document.location = document.location)
}
there
lmao that domain
to me it looks like a date format thing
rip in edge
I think it just does the time part of that website
In Spain a tweet that consists of an invented mystery has been made viral
and that page is a part of the mystery
yea
Is there any way to know what we have to put in the field below the countdown?
I'm going to take a shower and come back, I'll read what you say in about 10 minutes
I'm trying to find the endpoint for that form
its a POST request to the same url
you have to pass a Pkey which i think is the password, as well as the jungle cookie, which i think is related to auth
its interesting
im back
wb
Hi, Did i can use base64 image on embed thumbnail ?
@primal ferry i'm not sure but i think that you can only use urls or attchfile along with the embed
display: none the base64 image and replace it with your link.
I need a sql expert in dms pls
I have a Table with 3 cols in SQL.
Player, Goals, platform
Platform can only have the values pc, ps, xbox
I want to get the averages of the goals grouped by the platform and I need the output name to be GoalsAvg_pc, GoalsAvg_ps, GoalsAvg_xbox.. I know how to group it but Im stuck with the output names
Im usin Postgres
using System;
namespace Testing {
class bar {
public string variable = "hello world!";
static void Main(string[] args) {
this.variable = variable;
System.Console.WriteLine(variable);
}
}
}```
im doing something wrong here tho
im getting errors
What errors?
exit status 1
main.cs(8,23): error CS0120: An object reference is required to access non-static member `Testing.bar.variable'
main.cs(8,7): error CS0026: Keyword `this' is not valid in a static property, static method, or static field initializer
main.cs(8,12): warning CS1717: Assignment made to same variable; did you mean to assign something else?
main.cs(10,32): error CS0026: Keyword `this' is not valid in a static property, static method, or static field initializer
Compilation failed: 3 error(s), 1 warnings```
oh
the errors speak for themselves
oops
wait
well i need static in my Main() ๐ค
o yeah
how can I use a proxy with the module https://github.com/request/request
to connect to an API?
The docs are unclear
why would you need a proxy
Public APIs block IPs that make to many requests in a span of time. I have already emailed the compan(y/ies), they are fine with it.
dont make a lot of HTTP requests then ๐ค
then dont make too many requests in a span of time?
take it up to them
Samurai... You have to login to the API. I don't think you can scrape it
what
It's a login API...
do you know what scraping is
it does
Can you do that with login apis?
ok I figured out a workaround for the C#
public string variable = "hello world!";
public static void Main() => new TestClass().NonStatic();
public void NonStatic() {
System.Console.WriteLine(this.variable);
}```
static functions, variables or instances cannot support this since it is called a reference of the class
so you have to call the main content within a non-static function
basically i was being stupid because i knew main couldn't do exactly that limitation
wait
http://www.fmylife.com/ is a website for fml stories
since there is no api you have to scrape that page
you can do that with a page that uses the api or something like that
@earnest phoenix
scrape it

just google website scraping
Ok
so wait
It just pulls text off the page right?
yes
oml

you dont scrape the api

I scrape the page
But obviously u can't login like 1000 times to different accounts on one ip
Lol
So I have a code on glitch.com, and there is the main file (server.js) which has code like `if(command === help){
}`
There is also a file called command/help.js which has the code for the help command
How can I run the command/help.js file from server.js?
Discord.js lib
what does help.js look like
Just has the code for help command
Consts, vars and rich embeds
what is the code in help.js
Do you just want the code link?
you can just send the code in a codeblock
It's easier for you to help then as well
I may misunderstand
Please enable server dms
you can send it here
Thanks
ok send
me all the time
sends link to glitch join link when i said send in a codeblock
Just use the link
```js
// commands/help.js stuff
```
Whatever
module.exports.run = (bot, message) => {
//.addField("", "")
const e = new Discord.RichEmbed()
.setTitle("iSauce")
.setDescription("Here are the commands ")
.addField("Ping", "Responds with Pong ")
.addField("Link", "[Responds with a link to invite me](https://discordapp.com/api/oauth2/authorize?client_id=481212990398398466&permissions=8&scope=bot)")
.addField("Version", "Checks my current version")
.addField("Vsauce", "Gives a link to the Vsauce youtube channel")
.addField("Video", "Sends a random Vsauce video")
.addField("Kick", "Kicks a member")
.addField("Ban", "Bans a member")
.setColor(0x00ff00)
.setAuthor(`requested by ${message.author.tag}`, `${message.author.displayAvatarURL}`)
.setFooter("My creator is Pineapplefan1234YT#9295 and i had help from Bakagain#1844")
message.channel.send(e)
}
module.exports.help = {
name: "help"
}```
ok so
I don't see what's so super secret about this code... 
you have to require the file
you have to require commands/help.js
I d k what that means
so you know how to require discord.js but you don't know how to require commands/help.js?
is it your bot?
That's just my mobile keyboard
Auto capitalise
It doesn't do that in glitch.com
But was it right?
also did you look at what i sent
Which one
what
lol
So in the server.js file, I type the require, then what
no spoon feeding sir
this is the last time im sending it
click on this link to learn pretty basic stuff about using modules https://nodejs.org/api/modules.html
how would i check if my bot can dm the user
use a try catch
try to send the user a dm
if it catches an error have a message saying cant send dm
I don't get how circles and squared can translate to what I am doing
Squares*
D E N S E
Just leave it
The other dev is here
other dev
so what something like -
async function dm() {
message.author.send('message')
catch (error)
message.channel.send('**It appears I can't pm you!**')
}
dm()
no
heck
The other dev went offline
who is this other dev
so it would be like -
try {
message.author.send('message')
}
catch (error) {
message.channel.send(`**It appears I can't dm you**`)
}
that catch clause would never be ran, you're missing an await
where would i put the await?
So, module.exports.run = (bot, message) => { what do I do after this?
either
try {
await message.author.send('message');
} catch (e) {
message.channel.send('no');
}
or
message.author.send('message')
.catch(e => {
message.channel.send('no');
});
and did you get demoted, were you not mod before?
naw I resigned
he didnt get demoted
you first need a command handler
i bet the link he gave you said it
command handler is how you put commands in seperate files
How do I add a command handler
here, this guide and the next topic on it should help u https://discordjs.guide/#/command-handling/
A guide made by the community of discord.js for its users.
if your using js
im assuming you are
Yeah
so yeah thats a good guide
its a guide
thats Spoon feeding
follow the guide
The code was working
no one is going to spoonfeed you
its a guide just follow the steps
its not hard, even me with barely any knowledge of js can do it
it works
Not for me
ik this might be a year old but it really helped me when i started https://www.youtube.com/watch?v=w2fZKhsw4dE
We're going to make a handler for commands, where each command is in its own .js file under the ./cmd/ directory, making our code a lot cleaner. My Server (p...
those things are great for when your stuck, especially if your bot is kinda generic
like mine
using System;
namespace Mammalia {
public class Person {
public string[] life_identifs = {"name", "age", "weight"};
public string[] person_identifs = new string[3];
public static void Main() => new Person().makePerson();
public void makePerson() {
int count = 0;
foreach(string component in this.life_identifs) {
System.Console.WriteLine("What is your {0}?", component);
var answer = Console.ReadLine();
this.person_identifs[count] = answer;
count++;
}
count = 0;
System.Console.WriteLine();
foreach(string answer in this.person_identifs) {
System.Console.WriteLine("Your {0} is {1}.", this.life_identifs[count], answer);
count++;
}
}
}
}```
i got bored
so i created a shitty C# script
nice
hush
Why can I not just have code, the bot was working fine before
becuase we all work hard to make our bots work, even when something breaks, we fix it, its not our jobs its yours
It's not my fault
It wasn't me who broke it
well just rewrite it
we cant give you code
because it counts as spoon feeding
I didn't write that part
๐ค
well sam
it was either format in C#
or doing a long concat method
and concatenating is ๐คข
concat?
I didn't write the part that was deleted
k
Your ${this.life_identifiers[count]} is ${answer}.
then just write it this time around

Idk what the code was
I like C#
idk
s"Your ${life_identifiers[count]} is $count"
I can't rewrite that part
I have like a weird IDE/lang synesthesia
i wanna try coding a discord bot in C#
just for shits n giggles
to see how well it does
@wide ruin what
afaik
ive done it
then dont rewrite it do this magical thing called write it
discord api supports c#
if you made it once you can make it again
and C# is one of the only langs that can do rich presence
moosebot v1 was c#
besides custom user made ones
discord api doesn't support <language>
oof
it's just websocket + http
any language with implementations for those can use the discord api
I can't write the code
i guess that python code that discord has in the dev docs is meaningless then ๐ฐ
and the c# code
thought it was java
pineapple
lol
stop asking people to give you code
code it yourself or ask someone else outside this server
isn't most of their example stuff pseudocode
technically the official rich presence thing is c++
but it can be used in any language that has ffi calls to it
well technically C++ is good mainly of memory allocation events and can do more specified targeting
https://discordjs.guide/#/command-handling/ last time im giving you this link @wide ruin this will tell you how to do it
A guide made by the community of discord.js for its users.
C# is pretty much tighter in all
C# is the language of games now
a command handler can be just a map of command name to command
because of UE and Unity
UE is c++ afaik
I think you can use either
and any big game will most likely be using c(++)
you can do C++ and C# in games with UE
because performance
yeah
i think its only C# in Unity also
and control of the memory
Unity is C# scripting
@viscid falcon module.exports = { name: 'ping', description: 'Ping!', execute(message, args) { message.channel.send('Pong.'); }, };
C# is pretty good imo for game engine support but I do see it having one fatal flaw
on a garbage collected language you have no control over when GC might happen
which always feels weird to me
and that's memory allocation
and that will pause the game
C# can't deal with memory well on huge levels if you make a game
you can't really get rid of it either
so that is where C++ shines in
ok, why did you give me that
Is that the right code to use?
yes
that's the right code to use depending on your command handler
the format of the commands depends on it
you're making sure but you didn't test the code now did ya
๐ค
not trying to be harsh man but
use common sense
ugh god i just realized something
now that i deleted my bot
its gonna take ages to get it back into DBL
lmao
because they may have new stuff to look for
yeah
exports.run = async (bot, msg) => {
// command code
}
exports.settings = {
aliases: [],
disabled: false,
owner: false,
nsfw: false
}
exports.info = {
name: "command",
desc: "The description",
usage: "how u use the command"
}
this is how mine looks like
and like no mods lol
my help listing for help is next level
i have an idea of how you do this in python
I need to really learn how to use collectors
requires probably associate arrays on many levels and defining for events
since we're sharing command handlers ```scala
object CommandName {
permission = ...
category = ...
override def process(implicit c: Context): Unit = {
...
}
}```
lol
lol
holy shit
?
sec, got idea
i cant squint to look at that
@viscid falcon it's just going to send the word ping in that example, not run the file
for pagination i used a listener and a small state machine
k
lol
its big because it makes a few rethink calls and stuff
i really cant be much help, i dont even know how it works myself, i just followed a guide
i create a reaction collector then when someone clicks on a reaction i edit the messages and my command array gets sliced
how mine works 
slice command array then join by line breaks
hmm
paginator is just a small helper ```scala
trait Paginator[T] {
def renderPage(page: T, message: Message): Unit
def send(channel: MessageChannel, page: T): RestAction[Message]
}```
https://zero-two.is-a-good-waifu.com/7b6aa1.png because then all options of page types share a common api
and yes i know my names are stupid https://i.imgur.com/IgcYfii.png
Discord.Message ๐ค
My developers drop out and put my bot offline I need help
@shy verge I do not know
also you should just be able to log into whatever your hosting solution is and restart the bot
^
?
log into the computer running the bot and restart it
Oo ok
what does next() do on node.js
tells you to stop using node.js


We don't use that
That's part of generator functions right?
idk
I've used it in middleware in express
Well gtg find a new dev
@outer niche do you at least have the source code for the bot?
@zealous veldt cant
why?
My PC can't run it
what
run what?
Code
it can
how the fuck is your PC unable to run a console application
It is to old
next() isn't a node thing
its running fucking electron
it's an express thing
it'll be fine
it calls the next middleware
Nop
bet
bet
its running discord
discord has node internally
which is heavier than any bot that you'd be making
if it runs discord it runs node
No it duz not
what lang
ffs
๐
oml
well yeah what language are you using
hmmm
alright, can you download a code editor? that's what is going to edit the code within the files
ok python is mega lightweight just install python and pip whatever library you're using
@west raptor the computer is crap and I can't download crap
.
if you can't download anything, you can't make/work on a bot
or use nano or something
how did you download discord then lol
but if you can run discord you can run vscode
web client 
btw, nobody is going to make your bot for you just because you cant code "because of your computer"
I run Discord off of a phone
what
ffs
has a pc
why do you want a bot if you can't even make it yourself?
but uses discord on phone
you could run python/node on a phone
though if you ask us to code for you we will happily whip up a forkbomb script for you
you can?
Look I can't download crap on that computer and I don't get another one for another 3 years and all my developers dropped out and all I'm asking for is help
node and python can run on arm
no one is going to write your bot for you because you can't do it
I don't know but none of y'all are helping me anymore so I'm out
Pretty sure any old computer can run a bot 
WHAT
we're asking you simple questions to help you lol
bet
actualy i need to fix something first
im sure
brb building openjdk for x86
ok
Look the computer is trash it barely runs I can't use the thing for anything more than wise download a coding program and the person that was developing for me reset my bot put it offline and now I don't have access to redo it
mine's 4gb
oof
can you launch notepad atleast
@knotty steeple I do not know
If your computer is that slow sounds like you have a virus or something causing it to break ๐ค
ok here's the million dollar question
yeah
how old are you
Does it matter how old I am
kinda
i think you mean 12 dollar question @shy verge
^
Yeah I'm not going to tell random strangers how old I am
his wage is $1/year
dude we're not asking for your location
just your age
We don't even know who you are lol
lmao like knowing how you are would do anything bad
I don't know about that question I just don't like telling people how old I am
How come?
lamo chill he's not gonna tell us
I don't know any of you
21
.
k
Windows Key > Search Bar > System Information
@outer niche mkay how about this try use your computer and create a new user account and see if that lags
that wasn't so hard was it
you should find something like https://samuraistacks-leader-of-the.succ.world/i/o4j1w4r4.png
ok best course of action is to install Ubuntu server if your computer is really as potato as you say it is
Asking new users to install ubuntu pls
ok
4gb is enough to run a bot
ok
and vs code
๐
i run tons of stuff on my laptop
i could host my bot on my 3gb phone
maybe its using like 80% of memory right now because of torch
My laptop isnt expensive but atleast i can run Rocket League with medium graphics :/
yep
Good enough for me
~88%
just say what you need
How to install python?
@sand torrent what's the issue?
i wanna create a bot
you literally just pm'ed me that 
well
but u never helped me all u did was send a video
do you know any programming languages?
ya
what do you know?
visual studio c++
https://github.com/yourWaifu/sleepy-discord is the most updated lib
Although C++ libs arenโt updated like the other more popular ones
I would suggest JavaScript or Python
discord.net is c#
Can somone help me with this?
Traceback (most recent call last):
File "index.py", line 3, in <module>
from discord.ext.commands import HelpFormatter
ModuleNotFoundError: No module named 'discord'
not sure but it looks like you dont have discord.py installed?
oh hai advaith
Whats a simple language I can use to code a bot (besides JS) || Tag Me
I already have a js bot
in js does:
${client.users.size}```
show you only the users online? Or the total users?
Online I belive
I think
${(this).client.users.filter(u => u.presence.status === 'online').size}
``` i *think* this would work
correct me if im wrong
Yes users are cached users
If you want to get total you can loop through the guilds members
^
Don't forget to fetch guild members to update cache, though that shouldn't be necessary if you need to list online users only
Ello
What do you type in terminal to start a LUA bot?
do you even know lua
why are you making a bot in lua but you dont know it 
well learn how to run a lua file
lua is cool, and yea, learn lua and learn how to run a file
run a lua file
god
my wording is bad
hey could I get some with extending Discord.js's Message object in javascript
I want to add some extra information to it
though I can't seem to get it to also have the actual message objects data (channel, author, content, etc.)
I have successfully extended the Client object ```js
class MooseClient extends Client {
constructor(options) {
super(options);
this.playermanager = null;
this.logger = log;
this.dev = null;
this.config = null;
this.hastebin = hastebin;
this.r = r;
this.once("ready", this._ready.bind(this));
}
_ready() {
this.playermanager = new PlayerManager(this, nodes, {
user: this.user.id,
shards: 1
});
log.info(`Lavaplayer Ready`);
if (fs.existsSync('./development')) {
this.dev = true;
} else {
this.dev = false;
}
this.config = Config;
}
}```
and that works fine and I'm able to access the playermanager, etc. from the client object
though my message class just has the params that I set
Do you use super()?
yes
class MooseMessage extends Discord.Message {
constructor(msg) {
super(msg);
this.isMoosage = true;
this.hello = 'world';
}
}```
though when I try to use that i get things as undefined
I get errors like this https://i.imgur.com/EajAgx9.png
shit
Well you need to know how the Message class works. The constructor accepts client, data, and channel.
so I should have it like this? js constructor(channel, data, client) { ... }
do I need to manually set all of the properties D.js sets?
How do you install things on lua like on javascript its like npm i (package)
When you do super() pass the client, data which contains content and id and other stuff, and the channel object
Is it the same for lua?
same
A website for submitting and distributing Lua rocks
no he was just putting an example 
you're welcome
so with this, do I still have to declare all this stuff? js constructor(channel, data, client) { super(channel, data, client); ... https://i.imgur.com/HzCQNVf.png
Yes. If you want to access the data.
ok
You only have to define the data you want, but I recommend setting all of it
alright, thanks so much ๐
๐
PS C:\Users\username\desktop\Bot> lua bot.lua
C:\Program Files (x86)\Lua\5.1\lua.exe: bot.lua:1: module 'discordia' not found:
no field package.preload['discordia']
no file '.\discordia.lua'
no file 'C:\Program Files (x86)\Lua\5.1\lua\discordia.lua'
no file 'C:\Program Files (x86)\Lua\5.1\lua\discordia\init.lua'
no file 'C:\Program Files (x86)\Lua\5.1\discordia.lua'
no file 'C:\Program Files (x86)\Lua\5.1\discordia\init.lua'
no file 'C:\Program Files (x86)\Lua\5.1\lua\discordia.luac'
no file '.\discordia.dll'
no file 'C:\Program Files (x86)\Lua\5.1\discordia.dll'
no file 'C:\Program Files (x86)\Lua\5.1\loadall.dll'
no file 'C:\Program Files (x86)\Lua\5.1\clibs\discordia.dll'
no file 'C:\Program Files (x86)\Lua\5.1\clibs\loadall.dll'
no file '.\discordia51.dll'
no file 'C:\Program Files (x86)\Lua\5.1\discordia51.dll'
no file 'C:\Program Files (x86)\Lua\5.1\clibs\discordia51.dll'
stack traceback:
[C]: in function 'require'
bot.lua:1: in main chunk
[C]: ?
lit
this chat is lit
cringe
no u
I cant get it im just gonna go back to JavaScript ๐
did you actually try to learn lua?
No but I cant figure out how to install packages it was saying discordia not found or somthing
I did that and it didnt work
if(msg.guild.id === 'id') how i can add more id?
msg.guild.id === 'id1' || msg.guild.id === 'id2'
|| means or in an if statement
so you can put multiple parameters
if(this || or_this) then
&& means both have to be true
@inner jewel
if(this && this_too) then
is it fixed?
Idk i will test it
test it on another server first before telling them to unmute
In here
if they unmute they're assuming it has been fixed already
Thats fixed
idk how to get bot... sry i new
most bots have invites if thats what your after
most are like @someBot invite and get there link
see i left mine neutral lol
anyone got experience with wit.ai? i keep getting this error:
at validate (/home/tony/Bots/Aurora/node_modules/node-wit/lib/wit.js:88:11)
at new Wit (/home/tony/Bots/Aurora/node_modules/node-wit/lib/wit.js:20:45)
at Object.<anonymous> (/home/tony/Bots/Aurora/app.js:9:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
[tony@server Aurora]$ ```
I was wondering, is it okay to take some custom emojis from here?
i really like the tick yes and nos
ask some staff because there might be copyright issues in "taking" them
but im sure you can use them in your bot
i mean taking it for my bot yeah ๐ฎ
how do i start making bots
@sick cloud did u set an auth?
i got it, nvm
ok ๐ hope it works as u wanted it to be
You mean create a channel? You need to listen to the 'guildCreate' event, which is fired when the bot joins a new guild
createChannel() thingy
Looking for a developer who can help me with embed messages to group people who types a 3 digit code for example, pm me for more please.
if you want more help, post here. we're not gonna dm you
Sure
I have come this far https://gyazo.com/60fddf6506453d9506d15f358b5b432d and it should be something similar to this: https://gyazo.com/5f941dacd052fac14ea359b59295bfa3
you want to know how to listen for the 3 digit code?
can anyone type it or only the person who used the command?
Everyone can type it as soon the countdown has started, depends on their last 3 digits of their server id, so basically they match together with the same ID
Same goes for anyone else
It must be a 3 digit code with only numbers and letters in it
It will ignore any message if it's not 3 digits, so ignore 1, 2, 4, 5 digits etc...
Im using dbm
oh my god
?
