Skip to content

Commit

Permalink
2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chasyumen committed Sep 7, 2022
1 parent e64986a commit 8352d90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bot/commands/verification.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module.exports = {
if ((serverData).verification.channel && (serverData).verification.role) {
if (interaction.guild.channels.cache.has((serverData).verification.channel)) {
var channel = interaction.guild.channels.cache.get((serverData).verification.channel);
if (!channel.permissionsFor(interaction.guild.me).has([BigInt(1 << 10), BigInt(1 << 11), BigInt(1 << 14)])) {
if (!channel.permissionsFor((await interaction.guild.members.fetchMe())).has([BigInt(1 << 10), BigInt(1 << 11), BigInt(1 << 14)])) {
return await res.reply(`このBotに指定されたチャンネルを見る権限、メッセージを送る権限、埋め込みリンクを送信する権限のいずれかまたはすべてが付与されていないため有効化できません。`);
}
} else {
Expand Down Expand Up @@ -106,8 +106,8 @@ module.exports = {
return await res.reply("メンバー認証を無効にしました!");
} else if (interaction.options.getSubcommand() == "set_channel") {
var ch = interaction.options.getChannel("channel");
if (ch.type == "GUILD_TEXT") {
if (!ch.permissionsFor(interaction.guild.me).has([BigInt(1 << 10), BigInt(1 << 11), BigInt(1 << 14)])) {
if (ch.type == "0") {
if (!ch.permissionsFor((await interaction.guild.members.fetchMe())).has([BigInt(1 << 10), BigInt(1 << 11), BigInt(1 << 14)])) {
return await res.reply(`このBotには指定されたチャンネルを見る権限、メッセージを送る権限、埋め込みリンクの権限のいずれかまたはすべてがありません。`);
}
if (serverData.verification.latestVerifyMessage && interaction.guild.channels.cache.has(serverData["verification"]["channel"])) {
Expand Down
2 changes: 1 addition & 1 deletion bot/commands/welcome_member.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
return await res.reply("メンバー参加通知を無効にしました!");
} else if (interaction.options.getSubcommand() == "set_channel") {
var ch = interaction.options.getChannel("channel");
if (ch.type == "GUILD_TEXT") {
if (ch.type == "0") {
await interaction.guild.setdb({memberJoinNotifyChannel: ch.id});
return await res.reply(`メンバー参加通知チャンネルを <#${ch.id}> に設定しました。`);
} else {
Expand Down
2 changes: 1 addition & 1 deletion bot/events/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
event: "messageCreate",
exec: async function (message) {
if (message.author.bot) return;
if (message.channel.type !== "GUILD_TEXT") {
if (message.channel.type !== "0") {
return;
}
var channelData = await message.channel.getdb();
Expand Down

0 comments on commit 8352d90

Please sign in to comment.