@ApplyOptions<Command.Options>({
name: "channel-settings",
preconditions: ["GuildOnly"]})
export class UserCommand extends Command {
// slash command
public async chatInputRun(interaction: Command.ChatInputInteraction) {
const channel_settings = await this.container.answer_overflow.channel_settings.get({
where: {
channel_id: interaction.channelId,
},
});
// Problem is here, precondition says this only runs in a guild
const guild = interaction.guild;
}
}
@ApplyOptions<Command.Options>({
name: "channel-settings",
preconditions: ["GuildOnly"]})
export class UserCommand extends Command {
// slash command
public async chatInputRun(interaction: Command.ChatInputInteraction) {
const channel_settings = await this.container.answer_overflow.channel_settings.get({
where: {
channel_id: interaction.channelId,
},
});
// Problem is here, precondition says this only runs in a guild
const guild = interaction.guild;
}
}