release | ||
dev |
A little library that extends the discljord
Clojure client library for Discord, with:
These can be used independently; use of the utility methods does not require use of the framework, and vice versa.
NOTE: This library pre-dates the implementation of application (aka "slash") commands by Discord, and the approach it implements for commands is not longer considered idiomatic. Consider using application commands instead, perhaps via a library such as JohnnyJayJay/slash
.
API documentation is available here.
Express the correct maven dependencies in your deps.edn
:
{:deps {com.github.pmonks/discljord-utils {:mvn/version "LATEST_CLOJARS_VERSION"}}}
In your namespace(s):
(ns your.namespace
(:require [discljord-utils.util :as u] ; Handy utility methods that are not Discord / discljord specific
[discljord-utils.message-util :as mu])) ; Handy utility methods related to Discord / discljord messages
At the REPL:
(require '[discljord-utils.util :as u])
(require '[discljord-utils.message-util :as mu])
For now your best bet is to look at the for-science
bot as a fully-functional example of how to use the framework. It's a little cluttered with deployment specific paraphernalia (none of which is required by the micro-framework), but at a minimum you will need:
for-science
config file demonstrates the minimal required elements, and you can add whatever bot-specific configuration elements you need to this file as well)bot.main
namespace as the entry point for your bot, rather than any of your own namespacesOptionally, you can also provide:
!privacy
commandThis project uses the git-flow branching strategy, and the permanent branches are called release
and dev
, and any changes to the release
branch are considered a release and auto-deployed (JARs to Clojars, API docs to GitHub Pages, etc.).
For this reason, all development must occur either in branch dev
, or (preferably) in temporary branches off of dev
. All PRs from forked repos must also be submitted against dev
; the main
branch is only updated from dev
via PRs created by the core development team. All other changes submitted to main
will be rejected.
Copyright © 2020 Peter Monks
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close