openrc script, some changes

This commit is contained in:
Er2 2022-01-18 18:25:18 +03:00
parent f2db621150
commit 214b621cdf
4 changed files with 28 additions and 3 deletions

15
bot.rc Executable file
View File

@ -0,0 +1,15 @@
#!/sbin/openrc-run
# My bot service
# CHANGE VALUES TO MATCH YOURS
name="mybot"
description="My bot"
command="/home/er2/comp-tg/start.sh"
command_args=""
command_user="er2:er2"
command_background=true
depend() {}
pidfile="/run/${RC_SVCNAME}.pid"

View File

@ -1,3 +1,8 @@
return function(C, api, q)
api.inline:answer(q.id, api.inline.result('photo', '1', 'https://cdn.discordapp.com/attachments/871474214270554124/876506659311202395/unknown.png'):thumb('https://cdn.discordapp.com/attachments/871474214270554124/876506659311202395/unknown.png'))
api.inline
:answer(q.id, api.inline.result(
'photo', '1',
'https://cdn.discordapp.com/attachments/871474214270554124/876506659311202395/unknown.png'
):thumb 'https://cdn.discordapp.com/attachments/871474214270554124/876506659311202395/unknown.png'
)
end

View File

@ -39,8 +39,10 @@ return function(C, api)
end
api:setMyCommands(a)
--[[
a = {'levels', }
for i = 1, #a do
if not C.db[a[i]] then C.db[a[i]] = {} end
if not C.db[a[i] ] then C.db[a[i] ] = {} end
end
end
--]]
end

3
start.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd $(dirname $0)
lua5.3 init.lua