mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
Added createInvite
This commit is contained in:
15
lib/index.js
15
lib/index.js
@@ -14,19 +14,10 @@ a.on("warn", function (m) {
|
||||
|
||||
a.on("message", function (m) {
|
||||
if (m.content === "$$$") {
|
||||
a.createRole(m.channel.server, {
|
||||
name: "a_role!",
|
||||
color: 0xFF0000,
|
||||
hoist: true,
|
||||
permissions: ["manageRoles"]
|
||||
}).then(function (role) {
|
||||
a.addMemberToRole(m.author, role).then(function () {
|
||||
a.reply(m, "added!");
|
||||
})["catch"](function (e) {
|
||||
console.log(e.stack);
|
||||
});
|
||||
a.createInvite(m.channel).then(function (invite) {
|
||||
return a.reply(m, invite);
|
||||
})["catch"](function (e) {
|
||||
console.log(e.stack);
|
||||
return console.log(e.stack);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user