A GUI for Mirai written in Haskell. Also relies on Mirai HTTP API.
The GUI is based on Gtk. Special thanks to haskell-gi and gi-gtk-declarative.
Since it's a tradition in the Haskell community, this project is open-sourced under the BSD3 License instead of the suggested AGPL License. See LICENSE for more details.
stack build
or
stack install
-
Setup Mirai.
The project contains a shell script to set up Mirai easily (
setup-mirai.sh
). It downloads Miraijar
s and generates astart.sh
for you. After that what you have to do is (files mentioned below are generated after first run):-
Edit
mirai/config/Console/AutoLogin.hs
and add your account and password.If this doesn't work, you may have to add your account directly in the console using the
/login
command. -
Edit
mirai/config/MiraiApiHttp/setting.yml
and:-
Set
port
andauthKey
. -
Manually change
enableWebsocket
totrue
.
-
-
-
Setup GramHs.
Put a
gramhs.json
file in your/etc/
folder. It should be like (delete the comments):{ "baseUrl": "127.0.0.1", "miraiPort": 1234, "authKey": "authKey", "qq": 1234567890 }
where:
-
baseUrl: IP address of the Mirai server. Often your local machine.
-
miraiPort: The port you just set.
-
authKey: The authKey you just set.
-
qq: Your qq number added to AutoLogin.hs.
No field should be omitted.
-
-
Run
start.sh
and then the executable. -
If an error occurs saying a
.so
file cannot be found, just locate which package it's in and install the package. Meanwhile, you can report it so I can update thisREADME.md
and specify the needed package here. -
If you should encounter any bug while using GramHs, please first check if it's caused by Mirai or by this program and then report it.