Skip to content

Commit

Permalink
hot fix cannot add new user
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Dec 31, 2023
1 parent 033ca17 commit da30cad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,26 @@ or copy the useful files to the paths specified in `config.yml`.
## Docker deploy

1. Download `docker-compose.yml.example` and rename it to `docker-compose.yml`.
2. Specify every required environment variables in `docker-compose.yml`.
3. Use AssetRipper to extract Lyrica's APK, and put the useful files in the `res` dir
2. Download `data/config.yml` and put it in the `data` dir
(specified in the volume mapping in `docker-compose.yml`).
4. Run `docker compose up -d`.
3. Specify every required environment variables in `docker-compose.yml`.
4. Use AssetRipper to extract Lyrica's APK, and put the useful files in the `res` dir
(specified in the volume mapping in `docker-compose.yml`).
5. Run `docker compose up -d`.

If you want to build the image yourself,
clone this repo and rename `docker-compose.yml.example` to `docker-compose.yml`.
Change `image: ulysseszhan/lyricat:latest` to `build: .`.
Run `docker compose build`.

### Updating

Simply run `docker compose pull`.

### Migrate

Simply copy over `data.db` in the `data` dir (specified in the volume mapping in `docker-compose.yml`).

## License

This is **not** free software.
Expand Down
2 changes: 1 addition & 1 deletion lib/lyricat/bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def gen_multilingual_dynamic_commands name, aliases: [], **opts, &block
end
end
if DB.execute('select id from user where id=?', id).empty?
DB.execute 'insert into user values (?, ?, ?, ?)', id, session_token, (expiration.to_time.to_f*1000).round, LANGS.first
DB.execute 'insert into user values (?, ?, ?, ?)', id, session_token, (expiration.to_time.to_f*1000).round, LANGS.first.to_s
else
DB.execute 'update user set session_token=?, expiration=? where id=?', session_token, (expiration.to_time.to_f*1000).round, id
end
Expand Down
2 changes: 1 addition & 1 deletion lib/lyricat/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Lyricat
VERSION = '0.1.0'
VERSION = '0.1.1'
end

0 comments on commit da30cad

Please sign in to comment.