Skip to content

Commit

Permalink
dont need guild data + revert user install test
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Jul 19, 2024
1 parent b4f8c42 commit abc7ea1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/commands/info/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const command: Command = {
.addFields (
{ name: "📈 Version", value: bot.version, inline: true },
{ name: "🟢 Online Since", value: `<t:${(Date.now() - client.uptime).toString().slice(0, -3)}:f>`, inline: true },
{ name: "🔔 Active Reminders", value: `${client.reminders.size}`, inline: true },
{ name: "📊 Guild Count", value: `${client.guilds.cache.size}`, inline: true }
)

Expand Down
1 change: 0 additions & 1 deletion src/commands/reminders/remindme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ const command: Command = {
const reminder = await new Reminder({
reminder_id: id,
user: interaction.user.id,
guild: interaction.guild.id,
channel: interaction.channel.id,
set: Date.now(),
due: Date.now() + time,
Expand Down
4 changes: 3 additions & 1 deletion src/events/guild/interactionCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ const event: Event = {
try {
const requiredPerms: PermissionResolvable = ["SendMessages", "EmbedLinks"];

// Ignore interactions not in a guild
if(!interaction.guild) return;
// Ignore interactions if the bot does not have the required permissions
if(interaction.guild && !interaction.guild.members.me.permissions.has(requiredPerms)) return;
if(!interaction.guild.members.me.permissions.has(requiredPerms)) return;

// Autocomplete handler
if(interaction.isAutocomplete()) return await autocompleteHandler(client, interaction);
Expand Down
1 change: 0 additions & 1 deletion src/models/Reminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { model, Schema } from "mongoose";
const schema = new Schema({
reminder_id: String,
user: String,
guild: String,
channel: String,
delay: Number,
set: String,
Expand Down

0 comments on commit abc7ea1

Please sign in to comment.