Compare commits

..

No commits in common. "0b2a7ac8e515e232a0076b854de33892dae92eb8" and "6c0f8b437d80d1fa6d9bd83619a44980cb535a89" have entirely different histories.

4 changed files with 8 additions and 23 deletions

@ -1 +1 @@
Subproject commit da0a266b72f0919c5ed1bfa3fbc75e7d2f398229
Subproject commit fefafd4923e824cb5a7f762c7e65d24cdc1f8d87

View File

@ -16,9 +16,8 @@ rub =
res, suc = @tools._req @url, 'GET'
return 'err' if not suc
res = @tools.json.decode res or '{}'
res = res.ValCurs
return 'err' if not res
res = res.ValCurs
table.insert res.Valute, {
ID: 'R01000'
NumCode: '001'
@ -59,7 +58,7 @@ rub =
wants[i] = wants[i]\upper!
v, d, f = rub\course wants
if v == 'err'
if v == 'error'
return @api\reply msg, @locale\get 'error', 'req_err', msg.l
nf = {}

View File

@ -16,27 +16,13 @@ reg = {
{'чё%?*', 'ничё'}
}
stick = {
{
'AgADwAADcpO1DQ'
'редебало'
'CAACAgIAAx0CUY2umQACFItiHHUg6w_MPu6Vs8k76cwn4OIHNQACwAADcpO1DVbNTDlmHOWMIwQ'
}
}
(api, msg) =>
if msg.text
msg.text = utf8.lower ' '.. msg.text ..' '
t = msg.text
t = ''
for _, v in pairs reg
t = utf8.gsub t, '%s+'.. v[1] ..'%s+', ' '.. v[2] ..' '
api\reply msg, t if t ~= msg.text
elseif msg.sticker
for k, v in pairs stick
if msg.sticker.file_unique_id == v[1]
if math.random! <= 0.5
api\reply msg, v[2]
else api\sendSticker msg, v[3] --, _, _, _, msg.message_id
if utf8.match msg.text, '%s+'.. v[1] ..'%s+'
t ..= "#{v[2]} "
api\reply msg, t if t ~= ''
return

View File

@ -32,7 +32,7 @@ export dump = (t, d) ->
elseif type(v) == 'userdata'
v = '<USERDATA>'
c ..= ('%s%s = %s\n')\format (' ')\rep(d), k, v
c ..= ('%s%s = %s\n')\format (' ')\rep d, k, v
c
(api) =>