discord-hs alternatives and similar packages
Based on the "Networking" category.
Alternatively, view discord-hs alternatives based on common mentions on social networks and blogs.
-
snap-core
Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers. -
websockets
A Haskell library for creating WebSocket-capable servers -
call-haskell-from-anything
Call Haskell functions from any programming language via serialization and dynamic libraries -
PortFusion
Haskell-powered cross-platform transport-layer distributed reverse / forward proxy & tunneling solution – currently available for all TCP protocols (RDP, VNC, HTTP(S), SSH, ...). -
snap-server
A fast HTTP server library, which runs Snap web handlers. -
io-streams
Simple, composable, and easy-to-use stream I/O for Haskell -
HaskellNet
Haskell library which provides client support for POP3, SMTP, and IMAP protocols. -
glirc
Haskell IRC library and console client - Join us on libera.chat #glirc -
network-transport-zeromq
ZeroMQ transport for distributed-process (aka Cloud Haskell) -
secure-sockets
A library for making secure connections between servers. -
ngx-export
Nginx module for binding Haskell code in configuration files for great good! -
http-types
Generic HTTP types for Haskell (for both client and server code) -
graphula
A simple interface for generating persistent data and linking its dependencies -
network-transport-tcp
TCP Realisation of Network.Transport -
linklater
A Haskell library for the Slack API (including real-time messaging!) -
HaskellNet-SSL
Helpers to connect to SSL/TLS mail servers with HaskellNet
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of discord-hs or a related project?
README
Discord.hs
A Haskell wrapper for the Discord API
Using in a project
The preferred (and only supported) method of using discord.hs is through stack. Open your stack.yaml
and find the extra-deps
section. Add the following:
extra-deps:
- discord-hs-0.2.1
Then open your project.cabal file and add discord-hs
to your build-depends.
Alternatively, you can add discord-hs
to your project.cabal file, and run
stack solver --update-config
. This will let stack catch other missing dependencies
in your project and is most likely the better option.
PingPong
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
import Data.Text
import Pipes
import Network.Discord
reply :: Message -> Text -> Effect DiscordM ()
reply Message{messageChannel=chan} cont = fetch' $ CreateMessage chan cont Nothing
main :: IO ()
main = runBot (Bot "TOKEN") $ do
with ReadyEvent $ \(Init v u _ _ _) ->
liftIO . putStrLn $ "Connected to gateway v" ++ show v ++ " as user " ++ show u
with MessageCreateEvent $ \[email protected]{..} -> do
when ("Ping" `isPrefixOf` messageContent && (not . userIsBot $ messageAuthor)) $
reply msg "Pong!"
Known issues:
- Init isn't parsing correctly
- Client doesn't close correctly
- Missing voice support