Skip to content

Commit 26ae4cd

Browse files
committed
Migrate to Dokku
1 parent c91e811 commit 26ae4cd

File tree

175 files changed

+1483
-1741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+1483
-1741
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[*.hbs]
4+
indent_size = 2
5+
indent_style = space

.github/ISSUE_TEMPLATE/skill-request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assignees: yttrian
1111
What should this new skill be able to do?
1212

1313
**Are there any other skills already similar to it?**
14-
See the full skills list first: https://gl.yttr.org/en/latest/skills.html
14+
See the full skills list first: https://glyph.yttr.org/en/latest/skills.html
1515

1616
**How should it be triggered?**
1717
What must someone say to activate this skill?

.gitignore

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,4 @@
1-
2-
# Created by https://www.gitignore.io/api/gradle
3-
# Edit at https://www.gitignore.io/?templates=gradle
4-
5-
### Gradle ###
61
.gradle
7-
build/
8-
out/
9-
10-
# Ignore Gradle GUI config
11-
gradle-app.setting
12-
13-
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
14-
!gradle-wrapper.jar
15-
16-
# Cache of project
17-
.gradletasknamecache
18-
19-
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
20-
# gradle/wrapper/gradle-wrapper.properties
21-
22-
### Gradle Patch ###
23-
**/build/
24-
25-
# End of https://www.gitignore.io/api/gradle
26-
/.idea/
2+
.idea
3+
.kotlin
4+
build

.grazie.en.yaml renamed to .grazie.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# "en" in the file name specifies the natural language to be checked, so you can use other ISO codes, e.g. "ru" or "de"
2-
31
# A subset of "vale" linter syntax is supported:
42
# "existence", "substitution", "sequence", "capitalization", "occurrence", "conditional" rule types.
53
# See https://docs.errata.ai/vale/styles#extension-points for more details.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2024 Ian Moore
3+
Copyright (c) 2017-2025 Ian Moore
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Procfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
worker: ./glyph-bot/build/install/glyph-bot/bin/glyph-bot
2-
web: ./glyph-config/build/install/glyph-config/bin/glyph-config
1+
bot: ./glyph-bot/build/install/glyph-bot-jvm/bin/glyph-bot
2+
web: ./glyph-web/build/install/glyph-web-jvm/bin/glyph-web

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
[![GitHub](https://img.shields.io/github/license/glyph-discord/glyph.kt)](https://github.com/glyph-discord/glyph.kt/blob/master/LICENSE)
22
[![GitHub Sponsors](https://img.shields.io/github/sponsors/yttrian)](https://github.com/sponsors/yttrian)
3-
[![Discord Bots](https://discordbots.org/api/widget/status/248186527161516032.svg?noavatar=true)](https://discordbots.org/bot/248186527161516032)
4-
[![Discord Bots](https://discordbots.org/api/widget/servers/248186527161516032.svg?noavatar=true)](https://discordbots.org/bot/248186527161516032)
53

64
# glyph.kt
75

86
The Kotlin rewrite of the Glyph Discord bot.
97

108
Glyph is an experimental Discord bot that uses [DialogFlow](https://dialogflow.com/) to attempt to understand and
11-
process natural language requests as opposed to a traditional command based bot.
9+
process natural language requests as opposed to a traditional command-based bot.
1210

13-
To learn more about how to use Glyph, check out the documentation [here](https://gl.yttr.org/).
11+
To learn more about how to use Glyph, check out the documentation [here](https://glyph.yttr.org/).
1412

15-
## Self Hosting
13+
## Self-Hosting
1614

17-
In order to host your own copy of Glyph, some set up will be required.
15+
Hosting your own copy of Glyph requires some setup.
1816

1917
1. Create and train a [DialogFlow](https://dialogflow.cloud.google.com/) agent that understands all actions Glyph's
2018
skills refer to
21-
- Action is in the format "skill.feedback"
22-
- All references entities must be understood too
23-
- A free ("Trial") plan is sufficient
19+
- Actions are in the format "skill.feedback"
20+
- All referenced entities must be understood too
21+
- A free ("Trial") plan is enough
2422
- You should disable "Log interaction to Dialogflow"
25-
2. Create a PostgreSQL database and Redis data store
26-
3. Set the needed environment variables as seen in the application.conf files
23+
2. Create a MariaDB database and Redis data store
24+
3. Set the necessary environment variables as seen in the application.conf files
2725
4. Build and start the bot and config website
2826

2927
## License

build.gradle.kts

Lines changed: 0 additions & 29 deletions
This file was deleted.

database/schema/mariadb-schema.sql

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
create table Compliance
2+
(
3+
ComplianceID int auto_increment
4+
primary key,
5+
UserID bigint not null,
6+
Category int not null,
7+
OptedIn tinyint(1) not null,
8+
DecidedAt timestamp(6) default current_timestamp(6) not null,
9+
constraint Compliance_UserID_Category_unique
10+
unique (UserID, Category)
11+
);
12+
13+
create table ServerConfigs
14+
(
15+
ServerID bigint not null
16+
primary key,
17+
LogChannelID bigint null,
18+
LogJoin tinyint(1) default 0 not null,
19+
LogLeave tinyint(1) default 0 not null,
20+
LogKick tinyint(1) default 0 not null,
21+
LogBan tinyint(1) default 0 not null,
22+
LogNameChange tinyint(1) default 0 not null,
23+
LogPurge tinyint(1) default 0 not null,
24+
SelectableRolesLimit int default 1 not null,
25+
StarboardEnabled tinyint(1) default 0 not null,
26+
StarboardChannelID bigint null,
27+
StarboardEmoji varchar(32) default 'star' not null,
28+
StarboardThreshold int default 1 not null,
29+
StarboardAllowSelfStar tinyint(1) default 0 not null,
30+
QuickviewFuraffinityEnabled tinyint(1) default 1 not null,
31+
QuickviewFuraffinityThumbnail tinyint(1) default 1 not null,
32+
QuickviewPicartoEnabled tinyint(1) default 1 not null,
33+
WikiMinQuality int default 50 not null,
34+
constraint check_ServerConfigs_0
35+
check (`SelectableRolesLimit` = -1 or `SelectableRolesLimit` >= 1),
36+
constraint check_ServerConfigs_1
37+
check (`StarboardThreshold` >= 1),
38+
constraint check_ServerConfigs_2
39+
check (`WikiMinQuality` between 0 and 100)
40+
);
41+
42+
create table ServerSelectableRoles
43+
(
44+
ServerID bigint not null,
45+
RoleID bigint not null,
46+
constraint ServerSelectableRoles_ServerID_RoleID_unique
47+
unique (ServerID, RoleID),
48+
constraint fk_ServerSelectableRoles_ServerID__ServerID
49+
foreign key (ServerID) references ServerConfigs (ServerID)
50+
on update cascade on delete cascade
51+
);
52+
53+
create table ServerWikiSources
54+
(
55+
ServerID bigint not null,
56+
Destination varchar(100) not null,
57+
constraint ServerWikiSources_ServerID_Destination_unique
58+
unique (ServerID, Destination),
59+
constraint fk_ServerWikiSources_ServerID__ServerID
60+
foreign key (ServerID) references ServerConfigs (ServerID)
61+
on update cascade on delete cascade
62+
);

docker-compose.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
mariadb:
3+
image: mariadb:latest
4+
ports:
5+
- "3306:3306"
6+
environment:
7+
- MYSQL_DATABASE=glyph
8+
- MYSQL_USER=glyph
9+
- MYSQL_PASSWORD=glyph
10+
- MYSQL_ROOT_PASSWORD=root
11+
volumes:
12+
- mariadb_data:/var/lib/mysql
13+
14+
redis:
15+
image: redis:latest
16+
ports:
17+
- "6379:6379"
18+
19+
volumes:
20+
mariadb_data:

0 commit comments

Comments
 (0)