-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
96 lines (82 loc) · 2.5 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
require('dotenv').config()
// Utilização da Aoi.JS
const Aoijs = require("aoi.js")
const Discord = require('discord.js')
const util = require('util')
// Configurando a Database
const Aoifb = require("aoi.fb")
const firebase = Aoifb.Create({
apiKey: process.env.apiKey,
authDomain: process.env.authDomain,
databaseURL: process.env.databaseURL,
projectId: process.env.projectId,
storageBucket: process.env.storageBucket,
messagingSenderId: process.env.messagingSenderId,
appId: process.env.appId,
measurementId: process.env.measurementId
});
// Configurando o Client da Aoi.js
const bot = new Aoijs.Bot({
token: process.env.token,
prefix: '$getServerVar[prefix]',
intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES', 'GUILD_MESSAGE_REACTIONS', 'GUILD_PRESENCES', 'GUILD_VOICE_STATES'] ,
suppressAllErrors: true,
database: {
type: "aoi.fb",
db: firebase,
},
respondOnEdit:{
commands: true
}
});
// Configuração
const voice = new Aoijs.Voice(bot, {
cache: {
cacheType: "Memory",
enabled: true,
},
youtube: {
fetchAuthor:true
}
},true);
const loader = new Aoijs.LoadCommands(bot);
loader.load(bot.cmd, './Commands/', false)
bot.onInteractionCreate();
bot.onMessageDelete();
bot.onMessageUpdate();
bot.onMessage();
bot.readyCommand({
channel: "",
code: `$log[Ligado no usuário $userTag[$clientID]]`
})
// Status do Bot
require('./src/stats')(bot);
// Variáveis
require('./src/variables')(bot);
// Sistema de AFK (DESLIGADO)
/* bot.command({
name: "<@",
aliases: ["<!@"],
nonPrefixed: true,
code:`
$if[$getGlobalUserVar[afk;$mentioned[1]]==activated]
$reply[$messageID;😬・$username[$mentioned[1]] está no **modo AFK**. Deu uma saidinha...
> Motivo: \`\`\`$getGlobalUserVar[motivoAfk;$mentioned[1]]\`\`\`{delete:7s};yes]
$endif
`
})
bot.command({
name: "$alwaysExecute",
nonPrefixed: true,
code: `
$setGlobalUserVar[afk;disabled;$authorID]
$setGlobalUserVar[motivoAfk;não foi passado o motivo 😕;$authorID]
$if[$getGlobalUserVar[afk;$authorID]==activated]
$sendMessage[😉・**$username[$authorID]**, seu **modo AFK** foi desativado. Se precisar dar uma saindinha **:3** e ativar de novo peça pra mim usando \`$getServerVar[prefix]afk\`{delete:7s};no]
$onlyIf[$checkContains[$message[1];afk;off;ausente]==false;]
$endif`
}) */
function clean(text) {
const blankSpace = String.fromCharCode(8203)
return typeof text === 'string' ? text.replace(/`/g, '`' + blankSpace).replace(/@/g, '@' + blankSpace) : text
}