generated from Baipyrus/DiscordJS-Template
Compare commits
3 Commits
09f9280ae1
...
3b1d640612
Author | SHA1 | Date | |
---|---|---|---|
3b1d640612 | |||
09f9593a5c | |||
daf3767490 |
@ -249,7 +249,8 @@ Registered roles will automatically be assigned to new members
|
||||
|
||||
## Quirks/Bugs
|
||||
|
||||
None
|
||||
- Custom VC not working in global space
|
||||
- Categories with Custom VC channel in them need explicit permissions
|
||||
|
||||
## Changes
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {
|
||||
ChannelType,
|
||||
GuildChannel,
|
||||
PermissionFlagsBits,
|
||||
SlashCommandBuilder,
|
||||
ChatInputCommandInteraction
|
||||
@ -90,6 +91,7 @@ export async function execute(interaction) {
|
||||
}
|
||||
case 'register': {
|
||||
// Get channel id from user input
|
||||
/** @type {GuildChannel} */
|
||||
const { id } = options.getChannel('channel');
|
||||
|
||||
step = 'save';
|
||||
|
@ -6,7 +6,7 @@ export const name = Events.MessageCreate;
|
||||
/** @param {Message} message */
|
||||
export async function execute(message) {
|
||||
// Ignore direct messages and own messages
|
||||
if (!message.inGuild() || message.author.id === process.env.CLIENT) return;
|
||||
if (!message.inGuild() || message.author.id === message.client.user.id) return;
|
||||
|
||||
// Split message content into words
|
||||
const words = message.content
|
||||
|
@ -1,8 +1,5 @@
|
||||
import { Events, MessageReaction, User } from 'discord.js';
|
||||
import { Messages, RoleEmojiPairs } from '../../database.js';
|
||||
import { config } from 'dotenv';
|
||||
|
||||
config();
|
||||
|
||||
export const name = Events.MessageReactionAdd;
|
||||
/**
|
||||
@ -10,7 +7,7 @@ export const name = Events.MessageReactionAdd;
|
||||
* @param {User} user
|
||||
*/
|
||||
export async function execute(reaction, user) {
|
||||
if (user.id === process.env.CLIENT) return;
|
||||
if (user.id === user.client.user.id) return;
|
||||
|
||||
// Get message
|
||||
const msgID = reaction.message.id;
|
||||
|
@ -1,8 +1,5 @@
|
||||
import { Events, MessageReaction, User } from 'discord.js';
|
||||
import { Messages, RoleEmojiPairs } from '../../database.js';
|
||||
import { config } from 'dotenv';
|
||||
|
||||
config();
|
||||
|
||||
export const name = Events.MessageReactionRemove;
|
||||
/**
|
||||
@ -10,7 +7,7 @@ export const name = Events.MessageReactionRemove;
|
||||
* @param {User} user
|
||||
*/
|
||||
export async function execute(reaction, user) {
|
||||
if (user.id === process.env.CLIENT) return;
|
||||
if (user.id === user.client.user.id) return;
|
||||
|
||||
// Get message
|
||||
const msgID = reaction.message.id;
|
||||
|
@ -1,13 +1,10 @@
|
||||
import { ChatInputCommandInteraction, ContextMenuCommandInteraction, Role } from 'discord.js';
|
||||
import { Messages, RoleEmojiPairs, Guilds } from './database.js';
|
||||
import { readdir } from 'fs/promises';
|
||||
import { config } from 'dotenv';
|
||||
import { Op } from 'sequelize';
|
||||
import { join } from 'path';
|
||||
import Module from 'module';
|
||||
|
||||
config();
|
||||
|
||||
/**
|
||||
* Main logic of the different 'Self Roles remove' commands to remove the functionality from a `Message`.
|
||||
* @param {(ChatInputCommandInteraction|ContextMenuCommandInteraction)} interaction The interaction related to this command.
|
||||
@ -90,7 +87,7 @@ const saveMessageData = async (id, role, emoji) => {
|
||||
* @param {string} emoji Either a unicode emoji or a string representation in Discord custom emoji format.
|
||||
*/
|
||||
const editMessage = async (message, role, emoji) => {
|
||||
if (message.author.id !== process.env.CLIENT) return;
|
||||
if (message.author.id !== message.client.user.id) return;
|
||||
|
||||
// Find out whether to pad message or already present
|
||||
let padding = '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user