Antoine COMBET
3 years ago
5 changed files with 104 additions and 12 deletions
-
2.gitignore
-
40app/Commands.hs
-
53app/Main.hs
-
5botiut.cabal
-
14stack.yaml
@ -1,4 +1,6 @@ |
|||||
dist-newstyle |
dist-newstyle |
||||
|
.stack-work |
||||
|
*.lock |
||||
*.secret |
*.secret |
||||
*# |
*# |
||||
.#* |
.#* |
@ -0,0 +1,40 @@ |
|||||
|
{-# LANGUAGE OverloadedStrings #-} |
||||
|
module Commands where |
||||
|
|
||||
|
import Discord |
||||
|
import Discord.Types |
||||
|
import Discord.Interactions |
||||
|
import qualified Discord.Requests as R |
||||
|
|
||||
|
import qualified Data.Text as T |
||||
|
|
||||
|
pingCommand :: CreateApplicationCommand |
||||
|
pingCommand = |
||||
|
CreateApplicationCommand |
||||
|
"ping" |
||||
|
"pong" |
||||
|
(Just []) |
||||
|
Nothing |
||||
|
Nothing |
||||
|
|
||||
|
pingResponse :: InteractionResponse |
||||
|
pingResponse = interactionResponseBasic "Pong" |
||||
|
|
||||
|
edtCommand :: CreateApplicationCommand |
||||
|
edtCommand = CreateApplicationCommand |
||||
|
"edt" |
||||
|
"Gets the planning for a group" |
||||
|
(Just $ toInternal <$> |
||||
|
[ ApplicationCommandOptionValueString |
||||
|
"group" |
||||
|
"Group to get the planning for" |
||||
|
(Just True) |
||||
|
Nothing |
||||
|
Nothing |
||||
|
, ApplicationCommandOptionValueString |
||||
|
"day" |
||||
|
"The day you want the planning for as DD/MM(/YYYY)" |
||||
|
Nothing Nothing Nothing |
||||
|
]) |
||||
|
Nothing |
||||
|
Nothing |
@ -0,0 +1,14 @@ |
|||||
|
resolver: lts-18.24 |
||||
|
packages: |
||||
|
- . |
||||
|
allow-newer: true |
||||
|
extra-deps: |
||||
|
# Stuff not in stackage |
||||
|
- emoji-0.1.0.2 |
||||
|
- control-event-1.3 |
||||
|
- iCalendar-0.4.0.5 |
||||
|
- mime-0.4.0.2 |
||||
|
# My fork of discord-haskell to fix a bug |
||||
|
- github: Annwan/discord-haskell |
||||
|
commit: 830e3a0bcc2586e40e167a1ec14e357e6396a7d2 |
||||
|
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue