qol fixes
parent
0fb72d74ed
commit
0488480ae9
|
@ -20,7 +20,7 @@ export default class Mute extends Command {
|
||||||
if (!member) return this.error(message.channel, 'Cannot find user.');
|
if (!member) return this.error(message.channel, 'Cannot find user.');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res1 = await this.client.db.mongo.local.muted.get<boolean>(`muted-${member.id}`);
|
const res1 = await this.client.db.local.muted.get<boolean>(`muted-${member.id}`);
|
||||||
if (res1 || this.mainGuild.members.get(member.id).roles.includes('478373942638149643')) return this.error(message.channel, 'This user is already muted.');
|
if (res1 || this.mainGuild.members.get(member.id).roles.includes('478373942638149643')) return this.error(message.channel, 'This user is already muted.');
|
||||||
} catch {} // eslint-disable-line no-empty
|
} catch {} // eslint-disable-line no-empty
|
||||||
if (member && !this.client.util.moderation.checkPermissions(member, message.member)) return this.error(message.channel, 'Permission Denied.');
|
if (member && !this.client.util.moderation.checkPermissions(member, message.member)) return this.error(message.channel, 'Permission Denied.');
|
||||||
|
|
|
@ -180,6 +180,7 @@ export default class Score extends Command {
|
||||||
|
|
||||||
if (args[1] === 'soft' && !check) {
|
if (args[1] === 'soft' && !check) {
|
||||||
let name = '';
|
let name = '';
|
||||||
|
// eslint-disable-next-line no-unreachable-loop
|
||||||
for (const role of this.client.util.resolveMember(message.author.id, this.mainGuild).roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position)) {
|
for (const role of this.client.util.resolveMember(message.author.id, this.mainGuild).roles.map((r) => this.mainGuild.roles.get(r)).sort((a, b) => b.position - a.position)) {
|
||||||
name = `Library of Code sp-us | ${role.name}`;
|
name = `Library of Code sp-us | ${role.name}`;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -31,9 +31,9 @@ export default class SysInfo extends Command {
|
||||||
embed.setDescription('__Format of Services__\n- {Server/Service Name} + {various server stats} | {Node Library Used for Communication w/ Server or Service}');
|
embed.setDescription('__Format of Services__\n- {Server/Service Name} + {various server stats} | {Node Library Used for Communication w/ Server or Service}');
|
||||||
const mongoBuild = await mongoose.connections[0].db.command({ buildInfo: 1 });
|
const mongoBuild = await mongoose.connections[0].db.command({ buildInfo: 1 });
|
||||||
const mongoDatabase: {
|
const mongoDatabase: {
|
||||||
collections: number,
|
collections?: number,
|
||||||
objects: number,
|
objects?: number,
|
||||||
dataSize: number,
|
dataSize?: number,
|
||||||
} = await mongoose.connections[0].db.command({ dbStats: 1 });
|
} = await mongoose.connections[0].db.command({ dbStats: 1 });
|
||||||
const asteriskInformation = await this.client.util.pbx.ari.asterisk.getInfo();
|
const asteriskInformation = await this.client.util.pbx.ari.asterisk.getInfo();
|
||||||
const redisVersion = await this.client.util.exec('redis-cli info | grep "redis_version"');
|
const redisVersion = await this.client.util.exec('redis-cli info | grep "redis_version"');
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default class Unmute extends Command {
|
||||||
if (!member) return this.error(message.channel, 'Cannot find user.');
|
if (!member) return this.error(message.channel, 'Cannot find user.');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res1 = await this.client.db.mongo.local.muted.get<boolean>(`muted-${member.id}`);
|
const res1 = await this.client.db.local.muted.get<boolean>(`muted-${member.id}`);
|
||||||
if (!res1 || !this.mainGuild.members.get(member.id).roles.includes('478373942638149643')) return this.error(message.channel, 'This user is already unmuted.');
|
if (!res1 || !this.mainGuild.members.get(member.id).roles.includes('478373942638149643')) return this.error(message.channel, 'This user is already unmuted.');
|
||||||
} catch {} // eslint-disable-line no-empty
|
} catch {} // eslint-disable-line no-empty
|
||||||
if (member && !this.client.util.moderation.checkPermissions(member, message.member)) return this.error(message.channel, 'Permission Denied.');
|
if (member && !this.client.util.moderation.checkPermissions(member, message.member)) return this.error(message.channel, 'Permission Denied.');
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default class GuildMemberAdd extends Event {
|
||||||
|
|
||||||
public async run(_, member: Member) {
|
public async run(_, member: Member) {
|
||||||
try {
|
try {
|
||||||
const search = await this.client.db.mongo.local.muted.get<boolean>(`muted-${member.user.id}`);
|
const search = await this.client.db.local.muted.get<boolean>(`muted-${member.user.id}`);
|
||||||
if (search === true) {
|
if (search === true) {
|
||||||
member.addRole('478373942638149643', 'muted user left server and joined back');
|
member.addRole('478373942638149643', 'muted user left server and joined back');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue