Skip to content

Commit

Permalink
Prevenção de erros
Browse files Browse the repository at this point in the history
  • Loading branch information
odnols committed Oct 20, 2021
1 parent 6342796 commit a91fbe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ client.on("ready", async () => {
});

client.on("messageCreate", async message => {

if (message.channel.type === "text") {
const permissions = message.channel.permissionsFor(message.client.user);

if (!permissions.has("SEND_MESSAGES")) return; // Permissão para enviar mensagens no canal
}

if (message.content.includes(client.user.id) && !message.content.includes("usinfo") && !message.content.includes("userinfo")) { // Responde as mensagens em que é marcado

let prefix = client.prefixManager.getPrefix(message.guild.id);
Expand Down
2 changes: 1 addition & 1 deletion comandos/moderacao/angm.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = {
client.channels.cache.get('872865396200452127').send(mensagem);
});

let feedback_user = moderacao[6]["anuncio_games"] +"`"+ prefix +"angm rem`"+ moderacao[6]["anuncio_games_2"];
let feedback_user = moderacao[6]["anuncio_games"] +"`"+ prefix +"ngm rem`"+ moderacao[6]["anuncio_games_2"];

if(args[0] === "rem")
feedback_user = moderacao[6]["anuncio_off"];
Expand Down

0 comments on commit a91fbe9

Please sign in to comment.