Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
add emoji_stats to userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimateNyn committed Aug 12, 2022
1 parent 69d9965 commit 9ea3e3d
Show file tree
Hide file tree
Showing 8 changed files with 533 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ core-config.yaml
.env
target/
.idea/
.vscode/
.vscode/
image-cache/
112 changes: 112 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"
poise = "0.2.1"
lazy_static = "1.4.0"
strsim = "0.10.0"
magick_rust = "0.16.0"

[profile.release]
lto = "fat"
Expand Down
13 changes: 13 additions & 0 deletions sql/ttc-bot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ CREATE TABLE ttc_emoji_cache_messages (
CONSTRAINT ttc_emoji_cache_messages_pkey PRIMARY KEY (user_id)
);

-- public.ttc_emoji_download definition

-- Drop table

-- DROP TABLE ttc_emoji_download;

CREATE TABLE ttc_emoji_download (
id serial4 NOT NULL,
name varchar(32) NOT NULL,
extension varchar(4) NOT NULL,
CONSTRAINT ttc_emoji_download_name_key UNIQUE (name),
CONSTRAINT ttc_emoji_download_pkey PRIMARY KEY (id)
);

-- public.ttc_message_cache definition

Expand Down
67 changes: 67 additions & 0 deletions sqlx-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,32 @@
},
"query": "INSERT INTO ttc_emoji_cache (user_id, emoji_name, emoji_count) VALUES ($1, $2, $3)"
},
"1dc62bad11339bffb676ffd4e639dea0cfd94b86756a334903916739c93fe6ad": {
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int4"
},
{
"name": "extension",
"ordinal": 1,
"type_info": "Varchar"
}
],
"nullable": [
false,
false
],
"parameters": {
"Left": [
"Text"
]
}
},
"query": "SELECT id, extension FROM ttc_emoji_download WHERE name = $1"
},
"207ec70e47bdd9274434173708d605ab0df4af6a6c9ce751cc0493f3f681f153": {
"describe": {
"columns": [],
Expand Down Expand Up @@ -583,6 +609,26 @@
},
"query": "select distinct\n the.id as harold_emoji_id,\n the.\"name\" as harold_emoji\n from ttc_config tc\n inner join ttc_harold_emoji the on tc.harold_emoji_id = the.id order by the.id asc"
},
"986900915d2205bc961eedcf8ff717c28761b8418ad5daeb20ebbf0fc132dce5": {
"describe": {
"columns": [
{
"name": "count",
"ordinal": 0,
"type_info": "Int8"
}
],
"nullable": [
null
],
"parameters": {
"Left": [
"Text"
]
}
},
"query": "SELECT COUNT(name) from ttc_emoji_download WHERE name = $1"
},
"9ed87c7827a758e9ef9d6ce6bdb36886c5611d8ac4db0e7e5b016a94ebadd0a4": {
"describe": {
"columns": [],
Expand Down Expand Up @@ -673,6 +719,27 @@
},
"query": "\n INSERT INTO ttc_emoji_cache VALUES(0, $1, $2) \n ON CONFLICT (user_id, emoji_name) DO UPDATE SET emoji_count = ttc_emoji_cache.emoji_count + $2\n "
},
"adc51e73c63c3dd1b739811ce5a6eb8423a5a91d19c390f19490065c77989dc5": {
"describe": {
"columns": [
{
"name": "id",
"ordinal": 0,
"type_info": "Int4"
}
],
"nullable": [
false
],
"parameters": {
"Left": [
"Varchar",
"Varchar"
]
}
},
"query": "INSERT INTO ttc_emoji_download (name, extension) VALUES ($1, $2) RETURNING id"
},
"bb7972cadce53049f4695443e0698c3e6f89cfe7b446054243717f9364b3d258": {
"describe": {
"columns": [
Expand Down

0 comments on commit 9ea3e3d

Please sign in to comment.