add /me command
This commit is contained in:
2 files changed
+66
-3
No files matched your search
+11
-3
@@ -116,8 +116,8 @@ class QuarksBot extends Client {
|
||||
}
|
||||
|
||||
async GetGuild(GuildId) {
|
||||
let customChannelStatus;
|
||||
let allowedChannels;
|
||||
let customChannelStatus, allowedChannels;
|
||||
let actionChannel, tweetChannel;
|
||||
let guild = await this.dbo.collection("guilds").findOne({"server.serverID":GuildId}).then(guild => guild);
|
||||
|
||||
// If guild not found, generate guild default
|
||||
@@ -126,6 +126,8 @@ class QuarksBot extends Client {
|
||||
server: {
|
||||
serverID: GuildId,
|
||||
hasCustomChannels: false,
|
||||
actionChannel: null,
|
||||
tweetChannel: null
|
||||
}
|
||||
}
|
||||
this.dbo.collection("guilds").insertOne(newGuild, function(err, res) {
|
||||
@@ -133,15 +135,21 @@ class QuarksBot extends Client {
|
||||
});
|
||||
customChannelStatus = newGuild.server.hasCustomChannels;
|
||||
allowedChannels = null;
|
||||
actionChannel = null;
|
||||
tweetChannel = null;
|
||||
} else {
|
||||
customChannelStatus = guild.server.hasCustomChannels;
|
||||
if (guild.server.allowedChannels!=undefined||guild.server.allowedChannels!=null&&guild.server.allowedChannels.length>0) {
|
||||
actionChannel = guild.server.actionChannel;
|
||||
tweetChannel = guild.server.tweetChannel;
|
||||
if (this.exists(guild.server.allowedChannels) && guild.server.allowedChannels.length>0) {
|
||||
allowedChannels = guild.server.allowedChannels;
|
||||
} else allowedChannels = null;
|
||||
}
|
||||
let guildData = {
|
||||
allowedChannels: allowedChannels,
|
||||
customChannelStatus: customChannelStatus,
|
||||
actionChannel: actionChannel,
|
||||
tweetChannel: tweetChannel,
|
||||
serverID: GuildId
|
||||
}
|
||||
return guildData;
|
||||
|
||||
Reference in new issue
Block a user