forked from wrxck/mattata
-
Notifications
You must be signed in to change notification settings - Fork 6
/
configuration.example.lua
207 lines (198 loc) · 10.1 KB
/
configuration.example.lua
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
--[[
_ _ _
_ __ ___ __ _| |_| |_ __ _| |_ __ _
| '_ ` _ \ / _` | __| __/ _` | __/ _` |
| | | | | | (_| | |_| || (_| | || (_| |
|_| |_| |_|\__,_|\__|\__\__,_|\__\__,_|
Configuration file for mattata v1.2.0
Copyright 2017 Matthew Hesketh <wrxck0@gmail.com>
This code is licensed under the MIT. See LICENSE for details.
Each value in an array should be comma separated, with the exception of the last value!
Make sure you always update your configuration file after pulling changes from GitHub!
]]
local get_plugins = function(extension, directory)
extension = extension and tostring(extension) or 'mattata'
if extension:match('^%.') then
extension = extension:match('^%.(.-)$')
end
directory = directory and tostring(directory) or 'plugins'
if directory:match('/$') then
directory = directory:match('^(.-)/$')
end
local plugins = {}
local all = io.popen('mkdir -p ' .. directory .. '; ls ' .. directory .. '/'):read('*all')
for plugin in all:gmatch('[%w_-]+%.' .. extension .. ' ?') do
plugin = plugin:match('^([%w_-]+)%.' .. extension .. ' ?$')
table.insert(plugins, plugin)
end
return plugins
end
return { -- Rename this file to configuration.lua for the bot to work!
['bot_token'] = '', -- In order for the bot to actually work, you MUST insert the Telegram
-- bot API token you received from @BotFather.
-- The following two tokens will require you to have setup payments with @BotFather, and
-- a Stripe account with @stripe!
['stripe_live_token'] = '', -- Payment token you receive from @BotFather.
['stripe_test_token'] = '', -- Test payment token you receive from @BotFather.
['admins'] = { -- Here you need to specify the numerical ID of the users who shall have
-- FULL control over the bot, this includes access to server files via the lua and shell plugins.
nil
},
['language'] = 'en', -- The two character locale to set your default language to.
['log_chat'] = nil, -- This needs to be the numerical identifier of the chat you wish to log
-- errors into. If it's not a private chat it should begin with a '-' symbol.
['log_admin_actions'] = true, -- Should administrative actions be logged? [true/false]
['log_channel'] = nil, -- This needs to be the numerical identifier of the channel you wish
-- to log administrative actions in by default. It should begin with a '-' symbol.
['bug_reports_chat'] = nil, -- This needs to be the numerical identifier of the chat you wish to send
-- bug reports into. If it's not a private chat it should begin with a '-' symbol.
['counter_channel'] = nil, -- This needs to be the numerical identifier of the channel you wish
-- to forward messages into, for use with the /counter command. It should begin with a '-' symbol.
['download_location'] = '/tmp/', -- The location to save all downloaded media to.
['respond_to_misc'] = true, -- Respond to shitpostings/memes in mattata.lua? [true/false]
['max_copypasta_length'] = 300, -- The maximum number of characters a message can have to be
-- able to have /copypasta used on it.
['debug'] = false, -- Turn this on to print EVEN MORE information to the terminal.
['plugins'] = get_plugins(),
['redis'] = { -- Configurable options for connecting the bot to redis. Do NOT modify
-- these settings if you don't know what you're doing!
['host'] = '127.0.0.1',
['port'] = 6379,
['password'] = nil,
['db'] = 2
},
['keys'] = { -- API keys needed for the full functionality of several plugins.
['apod'] = '', -- https://api.nasa.gov/api.html
['cats'] = '', -- http://thecatapi.com/api-key-registration.html
['translate'] = '', -- https://tech.yandex.com/keys/get/?service=trnsl
['lyrics'] = '', -- https://developer.musixmatch.com/admin/applications
['lastfm'] = '', -- http://www.last.fm/api/account/create
['weather'] = '', -- https://darksky.net/dev/register
['youtube'] = '', -- https://console.developers.google.com/apis
['bing'] = '', -- https://datamarket.azure.com/account/keys
['flickr'] = '', -- https://www.flickr.com/services/apps/create/noncommercial/?
['news'] = '', -- https://newsapi.org/
['twitch'] = '', -- https://twitchapps.com/tmi/
['pastebin'] = '', -- https://pastebin.com/api
-- ['mashape'] = '', -- https://market.mashape.com/sphirelabs/advanced-porn-nudity-and-adult-content-detection
['dictionary'] = { -- https://developer.oxforddictionaries.com/
['id'] = '',
['key'] = ''
},
['adfly'] = { -- https://login.adf.ly/login
['apikey'] = '',
['userid'] = ''
},
['pasteee'] = '', -- https://paste.ee/
['google'] = { -- https://console.developers.google.com/apis
['api_key'] = '',
['cse_key'] = ''
},
['steam'] = '', -- https://steamcommunity.com/dev/apikey
['spotify'] = { -- https://developer.spotify.com/my-applications/#!/applications/create
['client_id'] = '',
['client_secret'] = '',
['redirect_uri'] = ''
},
['twitter'] = { -- https://apps.twitter.com/app/new
['consumer_key'] = '',
['consumer_secret'] = ''
},
['imgur'] = { -- https://api.imgur.com/oauth2/addclient
['client_id'] = '',
['client_secret'] = ''
}
},
['errors'] = { -- Messages to provide a more user-friendly approach to errors.
['connection'] = 'Connection error.',
['results'] = 'I couldn\'t find any results for that.',
['supergroup'] = 'This command can only be used in supergroups.',
['admin'] = 'You need to be a moderator or an administrator in this chat in order to use this command.',
['unknown'] = 'I don\'t recognise that user. If you would like to teach me who they are, forward a message from them to any chat that I\'m in.',
['generic'] = 'An unexpected error occured. Please report this error using /bugreport.'
},
['voteban'] = { -- Values used in plugins/administration.lua, for plugins/voteban.lua functionality.
['upvotes'] = {
['maximum'] = 50,
['minimum'] = 2
},
['downvotes'] = {
['maximum'] = 50,
['minimum'] = 2
}
},
['administration'] = { -- Values used in plugins/administration.lua.
['warnings'] = {
['maximum'] = 10,
['minimum'] = 2
}
},
['join_messages'] = { -- Values used in plugins/administration.lua.
'Welcome, NAME!',
'Hello, NAME!',
'Enjoy your stay, NAME!',
'I\'m glad you joined, NAME!',
'Howdy, NAME!',
'Hi, NAME!'
},
['eightball'] = { -- Values used in plugins/eightball.lua.
'It is certain.',
'It has been confirmed.',
'Without any doubts.',
'Yes, definitely.',
'You may rely on it.',
'As I see it, yes.',
'Most likely.',
'Outlook: not so good.',
'Yes.',
'Signs point to yes.',
'The reply is very weak, try again.',
'Ask again later.',
'I can not tell you right now.',
'Cannot predict right now.',
'Concentrate, and then ask again.',
'Do not count on it.',
'My reply is no.',
'My sources say possibly.',
'Outlook: very good.',
'Very doubtful.',
'Rowan\'s voice echoes: There is a time and place for everything, but not now.'
},
['faces'] = { -- Expressive emoticon faces which can be triggered with /<name>, used in plugins/faces.lua.
['shrug'] = '¯\\_(ツ)_/¯',
['lenny'] = '( ͡° ͜ʖ ͡°)',
['flip'] = '(╯°□°)╯︵ ┻━┻',
['look'] = 'ಠ_ಠ',
['shots'] = 'SHOTS FIRED',
['facepalm'] = '(-‸ლ)',
['vibrator'] = 'ヽヽ༼༼ຈຈل͜ل͜ຈຈ༽༽ノノ TURN OFF THE VIBRATOR ヽヽ༼༼ຈຈل͜ل͜ຈຈ༽༽ノノ',
['africa'] = '( ͡° ͜ʖ ͡°) Every 60 seconds in Africa, a minute passes. Together we can stop this. Please spread the word ( ͡° ͜ʖ ͡°)',
['chocolate'] = '\n╔╦╦\n╠╬╬╬╣\n╠╬╬╬╣OK! WHO ATE MY\n╠╬╬╬╣CHOCOLATE!!\n╚╩╩╩╝',
['kirby'] = '(つ -‘ _ ‘- )つ',
['finger'] = '\n /´¯/)\n ,/¯ /\n / /\n /´¯/’ ’/´¯¯`·¸\n /’/ / / /¨¯\\\n (‘( ´ ´ ¯~/’ ’)\n \\ ’ /\n \\ \\ _ ·´\n \\ (\n \\ \\,',
['rub'] = 'ヽ( ° ͜ʖ͡°)ノ ʀuʙ ᴍʏ ᴅᴏɴɢᴇʀ ヽ( ° ͜ʖ͡°)ノ',
['party'] = '୧༼ ͡◉ل͜ ͡◉༽୨ (ง ͠° ل͜ °)ง ヽ༼ຈل͜ຈ༽ノ ༼ ºل͟º ༽ Join da Party ୧༼ ͡◉ل͜ ͡◉༽୨ (ง ͠° ل͜ °)ง ヽ༼ຈل͜ຈ༽ノ ༼ ºل͟º ༽',
['lift'] = '\n❚█══█❚\nDo you even lift?',
['specs'] = 'ᒡ◯ᵔ◯ᒢ',
['sigh'] = '( ._.)'
},
['stickers'] = { -- Values used in mattata.lua, for administrative plugin functionality.
-- These are the file_id values for stickers which are binded to the relevant command.
['ban'] = {
'CAADBAADzwIAAlAYNw1h7nezc1nH7gI',
'CAADBAAD0AIAAlAYNw13TaMgAYaXywI'
},
['warn'] = {
'CAADBAAD0QIAAlAYNw1wPS6g_arjDgI',
'CAADBAAD0gIAAlAYNw2-pLQLQonbCQI'
},
['kick'] = {
'CAADBAAD0wIAAlAYNw3KIKm0bVviWwI'
}
}
}
--[[
End of configuration, you're good to go.
Use `./launch.sh` to start the bot.
If you can't execute the script, try running `chmod +x launch.sh`
]]