File tree Expand file tree Collapse file tree 10 files changed +101
-93
lines changed Expand file tree Collapse file tree 10 files changed +101
-93
lines changed Original file line number Diff line number Diff line change
1
+ const { Command } = require ( '../utils' ) ;
2
+
1
3
const STRINGS = {
2
- help : `
3
- Mostra informações sobre o bot.
4
+ help : Command . message `
5
+ Mostra informações sobre o bot.
4
6
5
- *uso:* \`\`\`!about [--args]\`\`\`
7
+ *uso:* \`\`\`!about [--args]\`\`\`
6
8
7
- *args válidos:*
9
+ *args válidos:*
8
10
\`\`\`--help\`\`\` -> _mostra esta mensagem._
9
- ` . trim ( ) ,
11
+ ` ,
10
12
11
- about : `
12
- Alice foi criada utilizando a biblioteca \`\`\`whatsapp-web.js\`\`\` como base sob licença Apache 2.0. Saiba mais em _https://github.com/pedroslopez/whatsapp-web.js_
13
+ about : Command . message `
14
+ Alice foi criada utilizando a biblioteca \`\`\`whatsapp-web.js\`\`\` como base sob licença Apache 2.0. Saiba mais em _https://github.com/pedroslopez/whatsapp-web.js_
13
15
14
- Não sabe como usar um comando? Use a flag help, ex: \`\`\`!lyric --help\`\`\`. Se não conhece os comandos, use \`\`\`!commands\`\`\`
16
+ Não sabe como usar um comando? Use a flag help, ex: \`\`\`!lyric --help\`\`\`. Se não conhece os comandos, use \`\`\`!commands\`\`\`
15
17
16
- _Quer contribuir? Então dá uma olhada em https://github.com/Coding-in-community/alice_
17
- ` . trim ( ) ,
18
+ _Quer contribuir? Então dá uma olhada em https://github.com/Coding-in-community/alice_
19
+ ` ,
18
20
} ;
19
21
20
22
class About {
Original file line number Diff line number Diff line change 1
1
const axios = require ( 'axios' ) ;
2
2
const cheerio = require ( 'cheerio' ) ;
3
+ const { Command } = require ( '../utils' ) ;
3
4
4
5
const STRINGS = {
5
- help : `
6
- Retorna dados de uma moeda disponível no CoinMarketCap (https://coinmarketcap.com).
6
+ help : Command . message `
7
+ Retorna dados de uma moeda disponível no CoinMarketCap (https://coinmarketcap.com).
7
8
8
- *uso:* \`\`\`!coin [--args] coin_name\`\`\`
9
+ *uso:* \`\`\`!coin [--args] coin_name\`\`\`
9
10
10
- *args válidos:*
11
+ *args válidos:*
11
12
\`\`\`--all\`\`\` -> _retorna todos os dados disponíveis._
12
13
\`\`\`--help\`\`\` -> _mostra essa mensagem._
13
- ` . trim ( ) ,
14
+ ` ,
14
15
} ;
15
16
16
17
async function loadCheerio ( url ) {
Original file line number Diff line number Diff line change
1
+ const { Command } = require ( '../utils' ) ;
2
+
1
3
const STRINGS = {
2
- help : `
3
- Lista todos os comandos disponíveis.
4
+ help : Command . message `
5
+ Lista todos os comandos disponíveis.
4
6
5
- *uso:* \`\`\`!commands [--args]\`\`\`
7
+ *uso:* \`\`\`!commands [--args]\`\`\`
6
8
7
- *args válidos:*
9
+ *args válidos:*
8
10
\`\`\`--help\`\`\` -> _mostra esta mensagem._
9
- ` . trim ( ) ,
10
-
11
- availableCommands : `
12
- Os seguintes comandos estão disponiveis:
13
- - !about
14
- - !coin
15
- - !commands
16
- - !cron
17
- - !links
18
- - !lyric
19
- - !report
20
- - !search
21
- - !suggest
22
- - !wiki
23
- ` . trim ( ) ,
11
+ ` ,
12
+
13
+ availableCommands : Command . message `
14
+ Os seguintes comandos estão disponiveis:
15
+ - !about
16
+ - !coin
17
+ - !commands
18
+ - !cron
19
+ - !links
20
+ - !lyric
21
+ - !report
22
+ - !search
23
+ - !suggest
24
+ - !wiki
25
+ ` ,
24
26
} ;
25
27
26
28
class Commands {
Original file line number Diff line number Diff line change 1
1
const events = require ( 'events' ) ;
2
- const { chattools, Time } = require ( '../utils' ) ;
2
+ const { chattools, Time, Command } = require ( '../utils' ) ;
3
3
4
4
const STRINGS = {
5
- help : `
6
- Repete uma mensagem em um determinado período de tempo. Cada mensagem é representada por uma thread.
5
+ help : Command . message `
6
+ Repete uma mensagem em um determinado período de tempo. Cada mensagem é representada por uma thread.
7
7
8
- *uso:* \`\`\`!cron --args [--kwargs=<type>] ...\`\`\`
8
+ *uso:* \`\`\`!cron --args [--kwargs=<type>] ...\`\`\`
9
9
10
- *args válidos:*
10
+ *args válidos:*
11
11
\`\`\`--create\`\`\` -> _cria uma nova thread._
12
12
\`\`\`--destroy\`\`\` -> _para e apaga uma thread._
13
13
\`\`\`--stop\`\`\` -> _para uma thread._
@@ -16,12 +16,12 @@ Repete uma mensagem em um determinado período de tempo. Cada mensagem é repres
16
16
\`\`\`--killall\`\`\` -> _para e apaga todas as threads._
17
17
\`\`\`--help\`\`\` -> _mostra esta mensagem._
18
18
19
- *kwargs válidos:*
19
+ *kwargs válidos:*
20
20
\`\`\`--s=<int>\`\`\` -> _define um periodo em segundos._
21
21
\`\`\`--m=<int>\`\`\` -> _define um periodo em minutos._
22
22
\`\`\`--h=<int>\`\`\` -> _define um periodo em horas._
23
23
\`\`\`--d=<int>\`\`\` -> _define um periodo em dias._
24
- ` . trim ( ) ,
24
+ ` ,
25
25
} ;
26
26
const emitter = new events . EventEmitter ( ) ;
27
27
Original file line number Diff line number Diff line change
1
+ const { Command } = require ( '../utils' ) ;
2
+
1
3
const STRINGS = {
2
- help : `
3
- Lista links para os grupos coding.
4
+ help : Command . message `
5
+ Lista links para os grupos coding.
4
6
5
- *uso:* \`\`\`!links [--args]\`\`\`
7
+ *uso:* \`\`\`!links [--args]\`\`\`
6
8
7
- *args válidos:*
9
+ *args válidos:*
8
10
\`\`\`--help\`\`\` -> _mostra esta mensagem._
9
- ` . trim ( ) ,
11
+ ` ,
10
12
11
- groupsLinks : `
12
- Coding in python:
13
- https://chat.whatsapp.com/I4IpHC0YFPQLUcGHJeqYdF
13
+ groupsLinks : Command . message `
14
+ Coding in python:
15
+ https://chat.whatsapp.com/I4IpHC0YFPQLUcGHJeqYdF
14
16
15
- Coding in C/C++:
16
- https://chat.whatsapp.com/Csn56Bpj8hVIQ3FiZoxBKh
17
+ Coding in C/C++:
18
+ https://chat.whatsapp.com/Csn56Bpj8hVIQ3FiZoxBKh
17
19
18
- Coding in Javascript:
19
- https://chat.whatsapp.com/IUXcqbAPdJC2IuNfd7aaF5
20
+ Coding in Javascript:
21
+ https://chat.whatsapp.com/IUXcqbAPdJC2IuNfd7aaF5
20
22
21
- Coding in PHP:
22
- https://chat.whatsapp.com/C6wcXZhyT869Q29PIL1J20
23
+ Coding in PHP:
24
+ https://chat.whatsapp.com/C6wcXZhyT869Q29PIL1J20
23
25
24
- Coding in Java:
25
- https://chat.whatsapp.com/KDjc7IoCAYWAjCAwNEJ5cF
26
+ Coding in Java:
27
+ https://chat.whatsapp.com/KDjc7IoCAYWAjCAwNEJ5cF
26
28
27
- Coding on Linux:
28
- https://chat.whatsapp.com/D37sPPhUsiT5LZ8PQeqg4t
29
+ Coding on Linux:
30
+ https://chat.whatsapp.com/D37sPPhUsiT5LZ8PQeqg4t
29
31
30
- Coding in Taberna:
31
- https://chat.whatsapp.com/GOXnIXSXEFH7wHvO9aTuFs
32
+ Coding in Taberna:
33
+ https://chat.whatsapp.com/GOXnIXSXEFH7wHvO9aTuFs
32
34
33
- Speaking in English:
34
- https://chat.whatsapp.com/EOirNapuFe3CVunBqbwj1Z
35
- ` . trim ( ) ,
35
+ Speaking in English:
36
+ https://chat.whatsapp.com/EOirNapuFe3CVunBqbwj1Z
37
+ ` ,
36
38
} ;
37
39
38
40
class Links {
Original file line number Diff line number Diff line change 1
1
const axios = require ( 'axios' ) ;
2
2
const JSSoup = require ( 'jssoup' ) . default ;
3
- const { search } = require ( '../utils' ) ;
3
+ const { search, Command } = require ( '../utils' ) ;
4
4
5
5
const STRINGS = {
6
- help : `
7
- Retorna a letra de uma música.
6
+ help : Command . message `
7
+ Retorna a letra de uma música.
8
8
9
- *uso:* \`\`\`!lyric [--args] music_name\`\`\`
9
+ *uso:* \`\`\`!lyric [--args] music_name\`\`\`
10
10
11
- *args válidos:*
11
+ *args válidos:*
12
12
\`\`\`--help\`\`\` -> _mostra esta mensagem._
13
- ` . trim ( ) ,
13
+ ` ,
14
14
} ;
15
15
16
16
async function makeSoup ( url ) {
Original file line number Diff line number Diff line change 1
- const { chattools } = require ( '../utils' ) ;
1
+ const { chattools, Command } = require ( '../utils' ) ;
2
2
3
3
const STRINGS = {
4
- help : `
5
- Reporte problemas no bot ou um usuário.
4
+ help : Command . message `
5
+ Reporte problemas no bot ou um usuário.
6
6
7
- *uso:* \`\`\`!report --args ...\`\`\`
7
+ *uso:* \`\`\`!report --args ...\`\`\`
8
8
9
- *args válidos:*
9
+ *args válidos:*
10
10
\`\`\`--bug\`\`\` -> _reporta um bug._
11
11
\`\`\`--user\`\`\` -> reporta um usuário._
12
12
\`\`\`--help\`\`\` -> _mostra esta mensagem._
13
- ` . trim ( ) ,
13
+ ` ,
14
14
bug : 'sua solicitação será analisada. caso confirmada, abriremos uma issue' ,
15
15
user : 'o usuário foi reportado a administração' ,
16
16
} ;
Original file line number Diff line number Diff line change 1
- const { search } = require ( '../utils' ) ;
1
+ const { search, Command } = require ( '../utils' ) ;
2
2
3
3
const STRINGS = {
4
- help : `
5
- Retorna o primeiro resultado de uma pesquisa no google.
4
+ help : Command . message `
5
+ Retorna o primeiro resultado de uma pesquisa no google.
6
6
7
- *uso:* \`\`\`!cron [--args] ...\`\`\`
7
+ *uso:* \`\`\`!cron [--args] ...\`\`\`
8
8
9
- *args válidos:*
9
+ *args válidos:*
10
10
\`\`\`--help\`\`\` -> _mostra esta mensagem._
11
11
\`\`\`--target\`\`\` -> _define um site especifico para pesquisa._
12
12
\`\`\`--limit\`\`\` -> _define um limite de resultados. O padrão é 1._
13
- ` . trim ( ) ,
13
+ ` ,
14
14
} ;
15
15
16
16
class Search {
Original file line number Diff line number Diff line change 1
- const { chattools } = require ( '../utils' ) ;
1
+ const { chattools, Command } = require ( '../utils' ) ;
2
2
3
3
const STRINGS = {
4
- help : `
5
- Sugira algo com este comando.
4
+ help : Command . message `
5
+ Sugira algo com este comando.
6
6
7
- *uso:* \`\`\`!suggest --args ...\`\`\`
7
+ *uso:* \`\`\`!suggest --args ...\`\`\`
8
8
9
- *args válidos:*
9
+ *args válidos:*
10
10
\`\`\`--feature\`\`\` -> _sugira algo novo._
11
11
\`\`\`--remove\`\`\` -> _sugira remoções._
12
12
\`\`\`--change\`\`\` -> _sugira mudanças._
13
13
\`\`\`--help\`\`\` -> _mostra esta mensagem._
14
- ` . trim ( ) ,
14
+ ` ,
15
15
} ;
16
16
17
17
class Suggest {
Original file line number Diff line number Diff line change 1
1
const wikijs = require ( 'wikijs' ) . default ;
2
+ const { Command } = require ( '../utils' ) ;
2
3
3
4
const STRINGS = {
4
- help : `
5
- Faz uma pesquisa na wikipedia.
5
+ help : Command . message `
6
+ Faz uma pesquisa na wikipedia.
6
7
7
- *uso:* \`\`\`!wiki [--args] ...\`\`\`
8
+ *uso:* \`\`\`!wiki [--args] ...\`\`\`
8
9
9
- *args válidos:*
10
+ *args válidos:*
10
11
\`\`\`--search\`\`\` -> _retorna uma lista com os títulos dos artigos encontrados._
11
12
\`\`\`--help\`\`\` -> _mostra esta mensagem._
12
- ` . trim ( ) ,
13
+ ` ,
13
14
} ;
14
15
15
16
class Wiki {
You can’t perform that action at this time.
0 commit comments