mirror of
https://github.com/danbulant/gists
synced 2026-05-19 03:58:31 +00:00
initial commit
This commit is contained in:
commit
bdff548a08
20 changed files with 4180 additions and 0 deletions
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
_site
|
||||
.sass-cache
|
||||
.jekyll-cache
|
||||
.jekyll-metadata
|
||||
vendor
|
||||
25
404.html
Normal file
25
404.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
permalink: /404.html
|
||||
layout: default
|
||||
---
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
.container {
|
||||
margin: 10px auto;
|
||||
max-width: 600px;
|
||||
text-align: center;
|
||||
}
|
||||
h1 {
|
||||
margin: 30px 0;
|
||||
font-size: 4em;
|
||||
line-height: 1;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<h1>404</h1>
|
||||
|
||||
<p><strong>Page not found :(</strong></p>
|
||||
<p>The requested page could not be found.</p>
|
||||
</div>
|
||||
37
Gemfile
Normal file
37
Gemfile
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
source "https://rubygems.org"
|
||||
# Hello! This is where you manage which Jekyll version is used to run.
|
||||
# When you want to use a different version, change it below, save the
|
||||
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
|
||||
#
|
||||
# bundle exec jekyll serve
|
||||
#
|
||||
# This will help ensure the proper Jekyll version is running.
|
||||
# Happy Jekylling!
|
||||
gem "jekyll", "~> 4.2.0"
|
||||
# This is the default theme for new Jekyll sites. You may change this to anything you like.
|
||||
gem "minima", "~> 2.5"
|
||||
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
|
||||
# uncomment the line below. To upgrade, run `bundle update github-pages`.
|
||||
# gem "github-pages", group: :jekyll_plugins
|
||||
# If you have any plugins, put them here!
|
||||
group :jekyll_plugins do
|
||||
gem "jekyll-feed", "~> 0.12"
|
||||
end
|
||||
|
||||
# Table of contents plugin
|
||||
gem 'jekyll-toc'
|
||||
# Seo tag from minima
|
||||
gem 'jekyll-seo-tag'
|
||||
|
||||
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
||||
# and associated library.
|
||||
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
||||
gem "tzinfo", "~> 1.2"
|
||||
gem "tzinfo-data"
|
||||
end
|
||||
|
||||
# Performance-booster for watching directories on Windows
|
||||
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
||||
|
||||
|
||||
gem "webrick", "~> 1.7"
|
||||
90
Gemfile.lock
Normal file
90
Gemfile.lock
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
colorator (1.1.0)
|
||||
concurrent-ruby (1.1.9)
|
||||
em-websocket (0.5.2)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
eventmachine (1.2.7)
|
||||
ffi (1.15.3)
|
||||
forwardable-extended (2.6.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.10)
|
||||
concurrent-ruby (>= 1.0)
|
||||
jekyll (4.2.0)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
i18n (~> 1.0)
|
||||
jekyll-sass-converter (~> 2.0)
|
||||
jekyll-watch (~> 2.0)
|
||||
kramdown (~> 2.3)
|
||||
kramdown-parser-gfm (~> 1.0)
|
||||
liquid (~> 4.0)
|
||||
mercenary (~> 0.4.0)
|
||||
pathutil (~> 0.9)
|
||||
rouge (~> 3.0)
|
||||
safe_yaml (~> 1.0)
|
||||
terminal-table (~> 2.0)
|
||||
jekyll-feed (0.15.1)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-sass-converter (2.1.0)
|
||||
sassc (> 2.0.1, < 3.0)
|
||||
jekyll-seo-tag (2.7.1)
|
||||
jekyll (>= 3.8, < 5.0)
|
||||
jekyll-toc (0.17.1)
|
||||
jekyll (>= 3.9)
|
||||
nokogiri (~> 1.11)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
kramdown (2.3.1)
|
||||
rexml
|
||||
kramdown-parser-gfm (1.1.0)
|
||||
kramdown (~> 2.0)
|
||||
liquid (4.0.3)
|
||||
listen (3.5.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.4.0)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
nokogiri (1.11.7-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (>= 2.6)
|
||||
public_suffix (4.0.6)
|
||||
racc (1.5.2)
|
||||
rb-fsevent (0.11.0)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (>= 1.0)
|
||||
rexml (3.2.5)
|
||||
rouge (3.26.0)
|
||||
safe_yaml (1.0.5)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
terminal-table (2.0.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
unicode-display_width (1.7.0)
|
||||
webrick (1.7.0)
|
||||
|
||||
PLATFORMS
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
jekyll (~> 4.2.0)
|
||||
jekyll-feed (~> 0.12)
|
||||
jekyll-seo-tag
|
||||
jekyll-toc
|
||||
minima (~> 2.5)
|
||||
tzinfo (~> 1.2)
|
||||
tzinfo-data
|
||||
wdm (~> 0.1.1)
|
||||
webrick (~> 1.7)
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.24
|
||||
54
_config.yml
Normal file
54
_config.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Welcome to Jekyll!
|
||||
#
|
||||
# This config file is meant for settings that affect your whole blog, values
|
||||
# which you are expected to set up once and rarely edit after that. If you find
|
||||
# yourself editing this file very often, consider using Jekyll's data files
|
||||
# feature for the data you need to update frequently.
|
||||
#
|
||||
# For technical reasons, this file is *NOT* reloaded automatically when you use
|
||||
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
|
||||
#
|
||||
# If you need help with YAML syntax, here are some quick references for you:
|
||||
# https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
|
||||
# https://learnxinyminutes.com/docs/yaml/
|
||||
#
|
||||
# Site settings
|
||||
# These are used to personalize your new site. If you look in the HTML files,
|
||||
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
|
||||
# You can create any custom variable you would like, and they will be accessible
|
||||
# in the templates via {{ site.myvariable }}.
|
||||
|
||||
title: text.danbulant.eu
|
||||
email: danbulant@danbulant.eu
|
||||
description: >- # this means to ignore newlines until "baseurl:"
|
||||
Online gist viewer for my text files.
|
||||
baseurl: "" # the subpath of your site, e.g. /blog
|
||||
url: "" # the base hostname & protocol for your site, e.g. http://example.com
|
||||
twitter_username: danbulant
|
||||
github_username: danbulant
|
||||
|
||||
# Build settings
|
||||
plugins:
|
||||
- jekyll-feed
|
||||
- jekyll-toc
|
||||
- jekyll-seo-tag
|
||||
|
||||
# Exclude from processing.
|
||||
# The following items will not be processed, by default.
|
||||
# Any item listed under the `exclude:` key here will be automatically added to
|
||||
# the internal "default list".
|
||||
#
|
||||
# Excluded items can be processed by explicitly listing the directories or
|
||||
# their entries' file path in the `include:` list.
|
||||
#
|
||||
# exclude:
|
||||
# - .sass-cache/
|
||||
# - .jekyll-cache/
|
||||
# - gemfiles/
|
||||
# - Gemfile
|
||||
# - Gemfile.lock
|
||||
# - node_modules/
|
||||
# - vendor/bundle/
|
||||
# - vendor/cache/
|
||||
# - vendor/gems/
|
||||
# - vendor/ruby/
|
||||
12
_includes/head.html
Normal file
12
_includes/head.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{%- seo -%}
|
||||
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
|
||||
{%- feed_meta -%}
|
||||
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
||||
{%- include google-analytics.html -%}
|
||||
{%- endif -%}
|
||||
</head>
|
||||
|
||||
32
_layouts/default.html
Normal file
32
_layouts/default.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
|
||||
|
||||
{%- include head.html -%}
|
||||
|
||||
<body>
|
||||
|
||||
{% unless page.isTop %}
|
||||
<span>
|
||||
<a href="..">Go back</a> | {{ page.dir }}
|
||||
</span>
|
||||
{% endunless %}
|
||||
<div class="content">
|
||||
<main>
|
||||
{{ content }}
|
||||
</main>
|
||||
<aside>
|
||||
{{ content | toc_only }}
|
||||
</aside>
|
||||
</div>
|
||||
<footer>
|
||||
{% if page.footer %}
|
||||
{{page.footer}}
|
||||
{% else %}
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA</a> (Atribution, non-commercial use and usage of same license required) unless otherwise noted. <br>
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.cs">CC BY-NC-SA</a> (Atribuce, nekomerční použití a použití stejné license vyžadováno) není-li řečeno jinak. <br>
|
||||
{% endif %}
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
292
assets/main.css
Normal file
292
assets/main.css
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
---
|
||||
# Frontmatter needed
|
||||
---
|
||||
.reset{} /* Reset coding errors */
|
||||
a.heading-link {
|
||||
visibility: hidden;
|
||||
padding-right: 6px;
|
||||
vertical-align: middle;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: calc((0.7em - 10px)/2);
|
||||
left: -0.8em;
|
||||
left: calc(-0.7em - 3px);
|
||||
background: url("/link.svg");
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
background-repeat: no-repeat;
|
||||
width: 0.7em;
|
||||
width: calc(0.7em - 2px);
|
||||
height: 0.7em;
|
||||
height: calc(0.7em - 2px);
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
position: relative;
|
||||
}
|
||||
h1:hover a, h2:hover a, h3:hover a, h4:hover a, h5:hover a, h6:hover a {
|
||||
visibility: visible;
|
||||
}
|
||||
.hljs {
|
||||
background: inherit;
|
||||
}
|
||||
html {
|
||||
color: #bfbfbf;
|
||||
filter: contrast(100%) brightness(100%) saturate(100%);
|
||||
color: rgb(180, 188, 202) !important;
|
||||
background: rgb(31, 31, 31) !important;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: none !important;
|
||||
margin: 0 auto;
|
||||
font-family: Roboto, Georgia, Palatino, serif;
|
||||
line-height: 1;
|
||||
max-width: 600px;
|
||||
padding: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: calc(100vh - 60px);
|
||||
}
|
||||
.content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
@media(min-width: 675px) {
|
||||
body {
|
||||
margin-left: calc((100vw - 660px)/3);
|
||||
}
|
||||
}
|
||||
@media(max-width: 1000px) and (min-width: 660px) {
|
||||
body {
|
||||
margin-left: calc((100vw - 660px)/4);
|
||||
}
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
color: rgb(191, 191, 191);
|
||||
font-weight: 400;
|
||||
}
|
||||
h1, h2, h3, h4, h5, p {
|
||||
margin-bottom: 24px;
|
||||
padding: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
margin: 24px 0 6px;
|
||||
}
|
||||
h3 {
|
||||
font-size: 24px;
|
||||
}
|
||||
h4 {
|
||||
font-size: 21px;
|
||||
}
|
||||
h5 {
|
||||
font-size: 18px;
|
||||
}
|
||||
a {
|
||||
color: rgb(157, 157, 231);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
a.active {
|
||||
color: rgb(188, 221, 255);
|
||||
}
|
||||
ul, ol {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
li {
|
||||
line-height: 24px;
|
||||
}
|
||||
li ul, li ul {
|
||||
margin-left: 24px;
|
||||
}
|
||||
p, ul, ol {
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
max-width: 540px;
|
||||
}
|
||||
pre {
|
||||
padding: 0px 24px;
|
||||
max-width: 600px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
code {
|
||||
font-family: Consolas, Monaco, Andale Mono, monospace;
|
||||
line-height: 1.5;
|
||||
font-size: 13px;
|
||||
}
|
||||
aside {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 390px;
|
||||
}
|
||||
blockquote {
|
||||
margin: 0;
|
||||
border-left: 2px solid rgb(180, 188, 202);
|
||||
padding: 0em 2em;
|
||||
max-width: 476px;
|
||||
}
|
||||
blockquote p {
|
||||
color: rgb(180, 188, 202);
|
||||
max-width: 460px;
|
||||
}
|
||||
hr {
|
||||
width: 540px;
|
||||
text-align: left;
|
||||
margin: 0 auto 0 0;
|
||||
color: #999;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 1em 1em;
|
||||
border: 1px solid #CCC;
|
||||
}
|
||||
table thead td {
|
||||
color: #666;
|
||||
}
|
||||
table td {
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #CCC;
|
||||
}
|
||||
footer {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track-piece {
|
||||
background-color: rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
background-color: rgba(255, 255, 255, 0.3) !important;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(255, 255, 255, 0.5) !important;
|
||||
}
|
||||
input,
|
||||
select,
|
||||
textarea,
|
||||
button {
|
||||
color: #bfbfbf;
|
||||
background-color: #1f1f1f;
|
||||
}
|
||||
|
||||
font {
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
aside {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
width: calc((100vw - 660px)/3*2);
|
||||
height: calc(100vh - 20px);
|
||||
overflow-x: auto;
|
||||
}
|
||||
@media (max-width: 1000px) {
|
||||
aside {
|
||||
width: calc((100vw - 660px)/4*3);
|
||||
}
|
||||
}
|
||||
@media (max-width: 910px) {
|
||||
aside {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: rgb(153, 153, 230);
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.purple {
|
||||
color: rgb(230, 153, 230);
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: #338ccc;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #338ccc;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #3e4346 !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #646464 !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track-piece {
|
||||
background-color: #3e4346 !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
height: 50px;
|
||||
background-color: #242424 !important;
|
||||
border: 2px solid #3e4346 !important;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {}
|
||||
|
||||
::-webkit-resizer {}
|
||||
|
||||
::-webkit-scrollbar-button:vertical:start:decrement {
|
||||
background:
|
||||
linear-gradient(130deg, #696969 40%, rgba(255, 0, 0, 0) 41%),
|
||||
linear-gradient(230deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(0deg, #696969 40%, rgba(0, 0, 0, 0) 31%);
|
||||
background-color: #b6b6b6;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-button:vertical:end:increment {
|
||||
background:
|
||||
linear-gradient(310deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(50deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(180deg, #696969 40%, rgba(0, 0, 0, 0) 31%);
|
||||
background-color: #b6b6b6;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-button:horizontal:end:increment {
|
||||
background:
|
||||
linear-gradient(210deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(330deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(90deg, #696969 30%, rgba(0, 0, 0, 0) 31%);
|
||||
background-color: #b6b6b6;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-button:horizontal:start:decrement {
|
||||
background:
|
||||
linear-gradient(30deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(150deg, #696969 40%, rgba(0, 0, 0, 0) 41%),
|
||||
linear-gradient(270deg, #696969 30%, rgba(0, 0, 0, 0) 31%);
|
||||
background-color: #b6b6b6;
|
||||
}
|
||||
|
||||
.hljs{display:block;overflow-x:auto;padding:.5em;color:#abb2bf;}
|
||||
.hljs-comment,.hljs-quote{color:#9199a7;font-style:italic}
|
||||
.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}
|
||||
.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}
|
||||
.hljs-literal{color:#56b6c2}
|
||||
.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#98c379}
|
||||
.hljs-built_in,.hljs-class .hljs-title{color:#e6c07b}
|
||||
.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}
|
||||
.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}
|
||||
.hljs-emphasis{font-style:italic}
|
||||
.hljs-strong{font-weight:700}
|
||||
.hljs-link{text-decoration:underline}
|
||||
528
ids.company/igni_actions.md
Normal file
528
ids.company/igni_actions.md
Normal file
|
|
@ -0,0 +1,528 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) <a href="https://ids.company">ids.company</a> 2021
|
||||
---
|
||||
# igni actions proposal
|
||||
|
||||
Actions are a way for developers to extend igni on a per-server basis. Actions:
|
||||
* are part of modules (each action must belong to a module)
|
||||
* can have settings (for member, user, or server), settings may or may not be editable from the website (as defined by [module.json](#module.json))
|
||||
* can have a service, which consists of at least one event listener and/or intervals
|
||||
* must have at least one command
|
||||
|
||||
## SDK
|
||||
|
||||
Modules and actions are to be developed using our SDK. The SDK consists of Commando (the main library for commands and services, edited to serve our needs) and the command-line utility (imm).
|
||||
|
||||
### Commando
|
||||
|
||||
Commando should work nearly identically to [`@iceprod/discord.js-commando`](https://github.com/iceproductions/commando), with its differences being:
|
||||
* Commands and event handlers MUST await all its promises, as the process may be killed at __any__ time after the function returns.
|
||||
* Collectors are not to be passed a function directly, instead, you should pass a name of the function __in the same class__.
|
||||
* There's no guilds property on the client, the only guild available is the one the event originated from.
|
||||
* Embeds MUST be used when sending direct messages, sending plain text is not supported.
|
||||
* Footers will be ignored when sending direct messages, instead, the following is used: `via <module name>, <server name>`.
|
||||
* Direct messages are rate limited to 5 *total* per event run. Edits don't count, deleted messages will still count towards the total (as this state isn't shared).
|
||||
* New settings function: getSettingsFromModule accepting `module`, `setting` and (optionally) `default` value. Used for getting public settings of other modules. Throws an error if module doesn't exist or if setting is private.
|
||||
* New method on guild: isModuleInstalled accepting `module` (string).
|
||||
|
||||
### IMM (igni module manager)
|
||||
|
||||
#### Installation
|
||||
|
||||
To install, you can run `npm i -g imm` as administrator (or using `sudo` on Linux) or use the `npx imm setup` command which will also create a bare project to get started with.
|
||||
|
||||
#### module.json
|
||||
|
||||
Module file is used for setting properties of the module bundle.
|
||||
|
||||
Required fields:
|
||||
* **name** - The code name to be used for the module. It will appear in URLs and can be used to get help. Must be unique in the account. Must be of the following RegEx: `[A-Za-z][0-9a-zA-Z_-]{2,15}`
|
||||
* **display_name** - The display name of the module, will be used for UI (in help, in module listing...). Can be any character (must be a valid text to get verified, emoji must not be used in public modules.)
|
||||
* **lang** - Language to use, currently only supported is `node`.
|
||||
|
||||
Optional fields
|
||||
* **team** - Not used, reserved for future use.
|
||||
* **version** - The version of language, defaults to `latest`. Semantic versioning accepted.
|
||||
* **entry** - The entry file to start, defaults to the default entry file of selected language.
|
||||
* **settings** - An array of objects with `name`, `type`, `description` and optionally `default`.
|
||||
* **public** - Array of settings that are readable by other modules.
|
||||
|
||||
##### Module settings
|
||||
|
||||
* `name` - must be a valid settings name, will directly be saved into guild settings as-is. Must pass the following RegEx: `[a-z][a-z0-9-_]{2,15}`
|
||||
* `type` - must be one of the following (case insensitive): `string`, `text` (multiline), `switch` (alias `bool` and `boolean`; results in boolean), `integer`, `float` (alias `number`), `range` (alias `integer-range`), `float-range` and `date`.
|
||||
* `from` - Optionally, only allowed for number types. Specifies the minimum number. Must be valid to that type.
|
||||
* `to` - Same as previous.
|
||||
* `oneOf` - Optional array of possible values, if set `from`, and `to` are ignored. Not usable for `switch` and `range`s.
|
||||
* `default` - Specifies the default value, makes it optional (when a required setting is not filed, the module will not be active). As long as it's set, it makes the setting optional (you can use `null` as the default variable too).
|
||||
|
||||
Ranges are returned in the format of an array with 2 elements. Dates are returned as a stringified Date object (`(new Date).toString()`).
|
||||
|
||||
###### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "example-module",
|
||||
"display_name": "Example module",
|
||||
"lang": "node"
|
||||
}
|
||||
```
|
||||
|
||||
### Commands
|
||||
|
||||
#### `setup`
|
||||
|
||||
Setups the project from start (interactively). Creates a `package.json` for npm, installs the required dependencies, creates `module.json`, and attempts (or guides you how) to install `imm` globally. Can be used directly from `npx`.
|
||||
|
||||
#### `init`
|
||||
|
||||
Will initialize the `module.json` file with specified options. `-y` (alias `--yes`) flag to use default values.
|
||||
|
||||
#### `publish`
|
||||
|
||||
Uploads the module to igni. Requires user to be logged in.
|
||||
|
||||
#### `login` (alias `connect`)
|
||||
|
||||
Creates a link to login via discord.
|
||||
|
||||
#### `logout` (alias `disconnect`)
|
||||
|
||||
Logs out the current user.
|
||||
|
||||
#### `run` (alias `test`)
|
||||
|
||||
Runs the test bot. Uses token from `DISCORD_TOKEN` environmental variable (also uses `.env` file), `token.txt` or `--token` (`--token <token>`) flag.
|
||||
No settings are preserved during restarts. Uses lots of debugging statements, so performance may be lower than on igni.
|
||||
|
||||
### Supported languages
|
||||
|
||||
#### Node
|
||||
|
||||
The latest long-term support (LTS) release supported, backward compatibility is on the best effort basis. Entry file is `index.js`.
|
||||
|
||||
##### Getting started with node
|
||||
|
||||
To start with node, run `npx imm setup node`. It will create a folder with all the required files while installing imm globally (if needed).
|
||||
|
||||
A sample `index.js` file to use:
|
||||
```js
|
||||
const igni = require("igni");
|
||||
|
||||
igni
|
||||
.registerCommandsIn("cmd")
|
||||
.registerDefaultTypes()
|
||||
.registerServicesIn("services");
|
||||
```
|
||||
|
||||
A sample folder structure:
|
||||
```plaintext
|
||||
project/
|
||||
cmd/
|
||||
services/
|
||||
index.js
|
||||
module.json
|
||||
package.json
|
||||
```
|
||||
|
||||
Command folder (`cmd`) expects to directly have files (folder structure is flattened, so you can group commands).
|
||||
Service folder (`services`) expects to directly have files or grouped files (Grouped services can be managed per group or per service). Further levels are flattened.
|
||||
|
||||
> **optional:** Use eslint with `require-await` rule. It's recommended as it's needed for getting verified (there can't be any side-effect promise functions).
|
||||
|
||||
### .immignore file
|
||||
|
||||
`.immignore` file is used for ignoring files to be uploaded. Its format is identical to `.gitignore` and `.npmignore`.
|
||||
|
||||
IMM ignores by default the folder `node_modules` and the file `package-lock.json`.
|
||||
|
||||
### Maximum size
|
||||
|
||||
The file system allows 32MB of space (including dependencies). Trying to use more will result in an error and the module failing to start. Verification increases the limit (per case).
|
||||
|
||||
## Modules
|
||||
|
||||
Modules are a bundle of actions. Its properties are defined by [module.json](#module.json) in the top directory of the module.
|
||||
|
||||
Global variables will not work.
|
||||
|
||||
### Commands
|
||||
|
||||
Commands are defined similarly to normal commando commands. Nearly any command working in commando will work in igni actions.
|
||||
|
||||
For collectors, you need to refactor the code to be stateless (the process may get restarted before the collector handler is started) and to use a method in the command class instead of directly passing a callback function.
|
||||
Await reactions/messages will not work (and are not defined). Filters are needed to be passed as method names too. Collectors now accept a third parameter, ID which is used to share state id. Must be short, you can usually use message ID.
|
||||
ID must be a string or number (`toString` method will be used).
|
||||
|
||||
```js
|
||||
module.exports = class Command extends commando.Command {
|
||||
// ... constructor
|
||||
run(msg) {
|
||||
var collector = this.createMessageCollector(
|
||||
msg.channel,
|
||||
"collectFilter",
|
||||
{
|
||||
time: 15000,
|
||||
errors: ["time"]
|
||||
}
|
||||
);
|
||||
collector.collect("collect", msg.id);
|
||||
collector.error("collectError", msg.channel.id);
|
||||
return msg.reply("Reply with any message");
|
||||
}
|
||||
|
||||
async collectError(error, id) {
|
||||
var channel = await client.channels.fetch(id);
|
||||
channel.reply("No message was sent");
|
||||
}
|
||||
|
||||
collectFilter(msg, id) {
|
||||
return true; // accept any message
|
||||
}
|
||||
|
||||
async collect(msg, id) {
|
||||
var original = await msg.channel.messages.fetch(id);
|
||||
msg.reply("You replied with " + msg.content + " to `" + original.content + "`.");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Services
|
||||
|
||||
Services are a set of event handlers and intervals. Most events will be used, except for those that cannot be linked to guilds (thus the action runner can't see which actions to run).
|
||||
|
||||
Intervals have a requirement of being static (you can't change the interval length or add intervals while the action is running, only in the service definition.). Services must have a name where the same rules as for command names apply (must be unique across services).
|
||||
|
||||
For message event, do NOT use it if you can write a RegEx for it - it will be much faster to create a command with a pattern set (e.g. to create `owo` counter, create a command where its pattern is `\bowo\b`.).
|
||||
It will also use less CPU time, thus actions may be cheaper. Event handlers now also allow third parameter - options, which may specify a rule for the event. Again, it's to make things as fast as possible, so we want to run the handler the least possible times.
|
||||
|
||||
Both intervals and event handlers require all promises to be awaited (in the same way as commands).
|
||||
|
||||
```js
|
||||
module.exports = class Service extends commando.Service {
|
||||
name = "test-service";
|
||||
load() {
|
||||
this.on("guildMemberAdd", "memberAdd", {
|
||||
settings: {
|
||||
guild: {
|
||||
"join-channel": true // requires join-channel to be set and non-falsy. Use null to allow falsy values. Use false to require the setting NOT to be set.
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async memberAdd(member) {
|
||||
var channelID = await member.guild.settings.get("join-channel");
|
||||
try {
|
||||
var channel = await member.guild.channels.fetch(channelID);
|
||||
} catch(e) { // if channel gets deleted, fail silently
|
||||
await member.guild.sendNotification({ // send notification to guild administrators
|
||||
type: "warning",
|
||||
content: "Test service cannot find channel " + channelID
|
||||
});
|
||||
await member.guild.settings.set("join-channel"); // setting to undefined removes the setting, thus disabling this service
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await channel.send(`${member.displayName} joined the server!`);
|
||||
} catch(e) {
|
||||
await member.guild.sendNotification({
|
||||
type: "warning",
|
||||
content: "Test service cannot send messages to channel " + channel.name
|
||||
});
|
||||
await member.guild.settings.set("join-channel");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Alternate services format idea
|
||||
|
||||
Have services use callbacks (like currently in commando) and instead of callback names just use the service name and find it in a map (then each map would have an array of callbacks to call).
|
||||
|
||||
#### Event rules
|
||||
|
||||
Event rules are an object that's used as 3rd parameter in event handlers. It's properties are `settings`, containing object with `guild`, `member` and/or `user` that each contain setting name mapped to `true` (set and non-falsy), `null` (set) or `false` (not set).
|
||||
|
||||
Another property is `clientPermissions`, which is an array of permissions that are needed for the handler to be usable and `userPermissions`, ignored by events where action runner can't get a user, for an array of permissions a user needs to have.
|
||||
|
||||
It also haves a property `manageable`, which specified if the dashboard should allow enabling/disabling the event handler. This requires another property, `name` to be set (display name for event handler), and allowing
|
||||
optional property `description`.
|
||||
|
||||
**Example:**
|
||||
```js
|
||||
{
|
||||
settings: {
|
||||
member: {
|
||||
allowLevelup: true
|
||||
}
|
||||
},
|
||||
clientPermissions: ["EMBED_LINKS"],
|
||||
manageable: true,
|
||||
name: "Level up messages",
|
||||
description: "Sends a level up message to specified channel whenever a user levels up."
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
#### Intervals
|
||||
|
||||
Intervals need to be at least 30 minutes apart and are NOT guaranteed to be in exact times (action runner may be few seconds to minutes late/too fast or the interval may not be run at all).
|
||||
You cannot set multiple intervals to the same handler and each service is limited to 2 intervals. The interval handler is run for every guild separately.
|
||||
|
||||
They need to be static (intervals cannot change their time once they're defined) and cannot be added on runtime. You can disable intervals using the `disableInterval` method and enable them back by using the `enableInterval` method,
|
||||
you cannot add new handlers once the service is loaded (you can only use this on the already-enabled intervals). Those methods exist on the client, so you can use them in commands as well (they're saved into `<service name>-interval-<handler name>` setting).
|
||||
|
||||
You can check the next scheduled time for an interval by `getInterval` which returns the next `Date` object, representing the time at which the handler should be called.
|
||||
|
||||
Intervals allow a 3rd parameter similar to event rules, except `userPermissions`, member settings, and user settings are ignored. Guild settings are moved directly into settings.
|
||||
|
||||
```js
|
||||
|
||||
module.exports = class Service extends commando.Service {
|
||||
name = "test-interval-service";
|
||||
load() {
|
||||
this.setInterval("bumpNotification", 2 * 60 * 1000, {
|
||||
settings: {
|
||||
"bump-channel": true
|
||||
},
|
||||
name: "Bump notification",
|
||||
mamageable: true,
|
||||
description: "Sends a message every 2 hours to specified channel."
|
||||
}); // ran every two hours
|
||||
}
|
||||
|
||||
async bumpNotification(guild) {
|
||||
var channelID = await guild.settings.get("bump-channel");
|
||||
try {
|
||||
var channel = await guild.channels.fetch(channelID);
|
||||
} catch(e) {
|
||||
await guild.settings.set("bump-channel");
|
||||
return await guild.sendNotification({ // send notification to guild administrators
|
||||
type: "warning",
|
||||
content: "Test interval service cannot find channel " + channelID
|
||||
});
|
||||
}
|
||||
try {
|
||||
await channel.send({
|
||||
embed: {
|
||||
title: "Bump",
|
||||
description: "You can use the `bump` command now."
|
||||
}
|
||||
});
|
||||
} catch(e) {
|
||||
await guild.settings.set("bump-channel");
|
||||
await guild.sendNotification({ // send notification to guild administrators
|
||||
type: "warning",
|
||||
content: "Test interval service cannot send messages to " + channel.name
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Getting started
|
||||
|
||||
To get started, create a node project with commando, init `imm` and start working on commands and services. To ease this process, you can use `npx imm setup` to guide you on how to set up your project.
|
||||
|
||||
## Timeouts
|
||||
|
||||
* initial run (loading services and commands) **10 seconds**
|
||||
* types (validating and parsing arguments) **2 seconds** each, **5 seconds** total
|
||||
* command run **30 seconds**
|
||||
* interval **15 seconds**
|
||||
* event handler **30 seconds**, max 2 simultaneously of the same type, others will be buffered
|
||||
* collectors **1 minute** (after that, they will be canceled and error callback will be run if `time` is in error array), one per command run simultaneously of the same type (you can have reaction and message collector at the same time)
|
||||
|
||||
## Verification
|
||||
|
||||
Module verification will be needed for the module to be available publicly on igni. The requirements are as follows:
|
||||
|
||||
* No errors - the bot should not ever respond with an error. If the command showing an error is optional, it may not prevent the verification but the command will be disabled.
|
||||
* Checks permissions - when the bot performs an operation that normally requires permissions, the command should check the user has given permissions (using the `userPermissions` property).
|
||||
* Timeouts are not exceeded - the timeouts must be fulfilled to be verified, favorably with some time margin. Timeouts may be increased when given a good enough reason.
|
||||
* No side-effect promises - promises must be awaited (at least in the end before returning using the `await Promise.all` method) before the command/service returns.
|
||||
* The module accomplishes something - set a goal and fulfill it, don't have just some empty commands.
|
||||
* Doesn't break any TOS or laws, including copyright. Using a free API (or paid one with a legally obtained token) is fine, scraping sites that explicitly forbid it is not.
|
||||
* Has a description - this means that the module has a semi-unique name and a description describing most (if not all) of its features and that each command has its own description.
|
||||
* Name must have readable characters - that's not limited to English (if you're making a module for the Chinese market, you can use Chinese characters) but it doesn't include emojis. Emojis can be in the name, but limit them to two maximum.
|
||||
|
||||
## Pricing
|
||||
|
||||
Github actions-like pricing might be used, i.e. per-minute pricing for each run. Each server could have a set of minutes for free (might be set on member range so bigger servers would have a bit more free minutes).
|
||||
|
||||
Github pricing:
|
||||
| Plan | Disk space (settings space?) | Minutes |
|
||||
| ---- | ---------------------------- | ------- |
|
||||
| GitHub Free | 500 MB | 2,000 |
|
||||
| GitHub Pro (4$/month) | 1 GB | 3,000 |
|
||||
|
||||
## Implementation details
|
||||
|
||||
### Initial run
|
||||
|
||||
* load all commands and services
|
||||
* save their metadata into the database (for help, dashboard, and info needed for running)
|
||||
* exit
|
||||
|
||||
### Cold start
|
||||
|
||||
When the module is started after some time of inactivity.
|
||||
|
||||
The module should listen on the port specified by IGNI_PORT (defaulting to 3000).
|
||||
|
||||
* load commands or services based on what's needed first
|
||||
* run the required services/commands
|
||||
* load the rest
|
||||
|
||||
### Warm start
|
||||
|
||||
* run the required services/commands
|
||||
|
||||
### Context
|
||||
|
||||
In the node context, setTimeout, setInterval, and setImmediate should be undefined. Instead, `awaitTimeout` should return a promise that resolves after *x* ms.
|
||||
|
||||
Promises could be proxied so that whenever a promise doesn't return before the command returns, a warning/error would be shown. We could also recommend using the `require-await` eslint rule.
|
||||
|
||||
### Communication
|
||||
|
||||
Communication should be done by WebSockets. Port TBD.
|
||||
|
||||
Types should be similar to API returned (using the `toJSON` method).
|
||||
|
||||
#### Nonces
|
||||
|
||||
Nonces are optional for requests, in which case the server should respond with the same nonce.
|
||||
|
||||
#### Command runs
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "commandRun",
|
||||
"message": {
|
||||
"content": "command-name arg1 arg2",
|
||||
...
|
||||
},
|
||||
"guild": { ... },
|
||||
"member": { ... },
|
||||
"author": { ... }
|
||||
}
|
||||
```
|
||||
|
||||
#### Event runs
|
||||
|
||||
Params contain the same fields as in discord.js event handlers.
|
||||
```json
|
||||
{
|
||||
"type": "...",
|
||||
"params": [ ... ]
|
||||
}
|
||||
```
|
||||
|
||||
#### Settings
|
||||
|
||||
Request:
|
||||
```json
|
||||
{
|
||||
"type": "settings",
|
||||
"sub": "guild",
|
||||
"nonce": "xxx"
|
||||
}
|
||||
```
|
||||
|
||||
Data:
|
||||
```json
|
||||
{
|
||||
"type": "settings",
|
||||
"sub": "guild",
|
||||
"nonce": "xxx",
|
||||
"data": { ... }
|
||||
}
|
||||
```
|
||||
|
||||
Setting data in request results in updating settings.
|
||||
|
||||
#### Fetching objects
|
||||
|
||||
Responses should be the same as using default API, using the `toJSON` method.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "channel",
|
||||
"id": "287158"
|
||||
}
|
||||
{
|
||||
"type": "user", // alias member
|
||||
"id": "177013"
|
||||
}
|
||||
{
|
||||
"type": "channels"
|
||||
}
|
||||
{
|
||||
"type": "members",
|
||||
"query": "..."
|
||||
}
|
||||
```
|
||||
|
||||
#### Registering collector
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "collector",
|
||||
"sub": "message", // or reaction
|
||||
"channel": "287158",
|
||||
"options": {
|
||||
"time": 15000,
|
||||
"errors": ["time"]
|
||||
},
|
||||
"callbacks": {
|
||||
"filter": "command:collectFilter",
|
||||
"collect": "command:collect",
|
||||
"error": "collect:collectError"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Running callbacks
|
||||
|
||||
If the filter passes, the action runner should automatically run the callback while replying.
|
||||
```json
|
||||
{
|
||||
"type": "collectorError",
|
||||
"sub": "command:collectError",
|
||||
"id": "123456",
|
||||
"error": {
|
||||
"reason": "time",
|
||||
...
|
||||
}
|
||||
}
|
||||
{
|
||||
"type": "collectorFilter",
|
||||
"sub": "command:collectFilter",
|
||||
"callback": "command:collect",
|
||||
"id": "123456",
|
||||
"message": { ... }
|
||||
}
|
||||
```
|
||||
|
||||
#### Collector filter reply
|
||||
|
||||
Sent to action runner.
|
||||
```json
|
||||
{
|
||||
"type": "collectorFilterReply",
|
||||
"id": "123456",
|
||||
"message": "123457", // message id
|
||||
"value": true // boolean
|
||||
}
|
||||
```
|
||||
|
||||
## Revisions
|
||||
|
||||
**Rev 1**
|
||||
* Added `public` optional field to [module.json](#module.json).
|
||||
* Added functions `getSettingFromModule` and `isModuleInstalled` to [commando](#commando).
|
||||
* Added `nonce`s to [Communication](#communication).
|
||||
11
ids.company/index.md
Normal file
11
ids.company/index.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) <a href="https://ids.company">ids.company</a> 2021
|
||||
---
|
||||
# <a href="https://ids.company">ids.company</a>
|
||||
|
||||
## Project ideas
|
||||
|
||||
* [igni actions](./igni_actions)
|
||||
* [profiles](./profiles)
|
||||
41
ids.company/profiles.md
Normal file
41
ids.company/profiles.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) <a href="https://ids.company">ids.company</a> 2021
|
||||
---
|
||||
# Profiles
|
||||
|
||||
## General info
|
||||
|
||||
Profiles should be saved into Jem (which should then be used for connecting other services to user account).
|
||||
|
||||
They should contain the following:
|
||||
|
||||
* name (directly tied to discord tag, possibly just have option to include the discriminator)
|
||||
* description (some sort if public bio)
|
||||
* viewable (so users can choose who can view their profile)
|
||||
* avatar (might as well be tied to discord avatar)
|
||||
* possibly background (depends on the style of profile pages; possibly premium only)
|
||||
* badges (for verified developers, igni developers, bug hunters...)
|
||||
|
||||
And other optional fields (e.g. birth date, gender...) that may or may not be public.
|
||||
|
||||
## Finding friends
|
||||
|
||||
The bot could be used for finding friends or people with similar interests - the base function could be searching for people in same server who have a game account connected to their jem/discord one. Additionally, the bot could also search for people of a set gender or around given age (not exact).
|
||||
|
||||
### Skill level
|
||||
|
||||
For games, the bot could also save "skill level" of sorts (for games where it's possible, their global rank) and then could sort people who have similar skill levels.
|
||||
|
||||
## Moderation
|
||||
|
||||
Profiles should be also used for global moderation of sorts - when user gets banned in a server, it could broadcast that ban and it's reason to other servers (and could be visible in user's history).
|
||||
|
||||
This function should be controlled to not be abused, so for example only servers with member count above a certain treshold would broadcast their bans/kicks/warns.
|
||||
|
||||
It should be also usable in automoderation (for example if the user is frequently flagged as a bot, igni should require higher verification minimum, or when a user is frequently warned for spamming igni should give higher sanctions).
|
||||
|
||||
## Privacy
|
||||
|
||||
Actions should have access to these profiles only limited and as per settings. Only the discord info itself (name, avatar), description (if profile set to public or if action ran from user) and the banner. Other fields only when action explicitly requests and is verified (and are allowed to do so).
|
||||
2799
igni/README.md
Normal file
2799
igni/README.md
Normal file
File diff suppressed because it is too large
Load diff
18
igni/aztec.md
Normal file
18
igni/aztec.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Aztec deprecation
|
||||
|
||||
Aztec is currently in the deprecation process and will be shut down soon. To continue using Aztec, you can instead [invite](https://top.gg/bot/739864286775738399) igni, which can replace Aztec fully while also improving the overall experience. You can learn more about igni [here](README.md).
|
||||
|
||||
## Just to name a few improvements
|
||||
|
||||
* Giveaways now work longer than just few hours and can have rules like number of messages
|
||||
* Message number counting
|
||||
* Working invite manager
|
||||
* Counting channels
|
||||
* More log events
|
||||
* Custom aliases
|
||||
* Less bugs
|
||||
8
igni/discogs.md
Normal file
8
igni/discogs.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Discogs integration
|
||||
|
||||
igni can search in discogs using the `discogs` command in the `search` module.
|
||||
10
igni/index.md
Normal file
10
igni/index.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Igni
|
||||
|
||||
* [About igni](./README)
|
||||
* [Aztec users](./aztec)
|
||||
* [logs](./logs)
|
||||
10
igni/lastfm.md
Normal file
10
igni/lastfm.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Last.fm integration
|
||||
|
||||
You can search last.fm using the `lastfm` command (aliased `lfm`) from `search` module.
|
||||
|
||||
The command searches in artists, tracks and albums and selects the one with the closest name (and sends it as embed).
|
||||
98
igni/logs.md
Normal file
98
igni/logs.md
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Logs
|
||||
|
||||
igni has advanced logs, but that comes with a compromise - they're a bit harder to setup in text chat (on our dashboard with UI, it will be much simpler).
|
||||
|
||||
## Adding channel to logs
|
||||
|
||||
To add channel to logs, simply call `logs add` or `logs set` with channel name, like
|
||||
```
|
||||
!logs add #logs
|
||||
```
|
||||
|
||||
## Editing rules for logs
|
||||
|
||||
To edit rules, call `logs alter` with channel name and rule alterations.
|
||||
|
||||
### List of rules
|
||||
|
||||
Aztec uses minecraft-permissions-like rules for logs. A list of all rules can be seen here:
|
||||
|
||||
* `*` - Wildcard, any event (default)
|
||||
* `*.*` - Alias to `*`
|
||||
* `user.*` - Any user related event
|
||||
* `channel.*` - Any channel related event (messages aren't part of it)
|
||||
* `category.*` - Any category related event (category create/update/delete)
|
||||
* `message.*` - Message related event (excluding new messages)
|
||||
* `guild.*` - Server related events (rename, ban, region change etc)
|
||||
* `roles.*` - Roles related events
|
||||
* `config.*` - Bot config related events
|
||||
* `emoji.*` - Emoji create/rename/delete
|
||||
* `invite.*` - Invite related events
|
||||
|
||||
* `user.join` - When user joins the server
|
||||
* `user.leave` - When user leaves the serevr
|
||||
* `user.update` - User update (avatar change, rename etc) [doesn't work]
|
||||
* `user.presenceUpdate` - On user presence change. Can be enabled only by bot owner.
|
||||
|
||||
* `channel.create` - When new channel is created
|
||||
* `channel.delete` - When channel is deleted
|
||||
* `channel.pins` - When there's a new pinned message [doesn't work]
|
||||
* `channel.update` - When channel is updated (currently excluding permission changes)
|
||||
* `channel.name` - When channel is renamed
|
||||
|
||||
* `category.create` - When category is created
|
||||
* `category.delete` - When category is deleted
|
||||
* `category.perms` - When permissions for category are changed [doesn't work]
|
||||
* `category.name` - When category is renamed
|
||||
|
||||
* `guild.update` - When guild is updated (excluding permission changes)
|
||||
* `guild.boost` - When premium user boosts guild (bot boosting, not discord boost)
|
||||
* `guild.ban` - When user gets banned
|
||||
* `guild.removeBan` - When user gets unbanned
|
||||
* `guild.integration` - When there's new integration [doesn't work]
|
||||
* `guild.kick` - When user gets kicked
|
||||
* `guild.warn` - When user gets warned **using igni**
|
||||
* `guild.webhook` - When guild webhook settings changes [doesn't work]
|
||||
|
||||
* `roles.create` - When role is created
|
||||
* `roles.update` - When role is updated
|
||||
|
||||
* `message.withLink` - When a message with link is posted [doesn't work, might be removed later]
|
||||
* `message.withInvite` - When a message with invite to server is posted [doesn't work, might be removed later]
|
||||
* `message.edit` - When message is edited
|
||||
* `message.delete` - When message is deleted
|
||||
* `message.purge` - When messages are purged (mass deleted)
|
||||
|
||||
* `emoji.create` - When emoji is created [doesn't work]
|
||||
* `emoji.delete` - When emoji is deleted [doesn't work]
|
||||
* `emoji.update` - When emoji is updated [doesn't work]
|
||||
|
||||
* `invite.create` - When invite is created
|
||||
* `invite.delete` - When invite is deleted
|
||||
|
||||
### Alterations
|
||||
|
||||
Channels are updated using `alterations` which is specified by a single character before rule - either `-` (remove), `+` (add) or `!` (toggle, invert).
|
||||
|
||||
You can put as many alterations after each other as you want.
|
||||
|
||||
**Example**
|
||||
|
||||
*The following will log every message edit*
|
||||
```
|
||||
!logs alter #logs -* +message.edit
|
||||
```
|
||||
*Note that you need to remove wildcard first before other rules take effect*
|
||||
|
||||
## Removing channel from logs
|
||||
|
||||
You can remove logs channel using `remove` subcommand:
|
||||
|
||||
```
|
||||
!logs remove #logs
|
||||
```
|
||||
75
igni/privacy.md
Normal file
75
igni/privacy.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Privacy policy
|
||||
|
||||
## Terms
|
||||
|
||||
### ID
|
||||
|
||||
ID is used for uniquely identifiying token, that doesn't contain any private data by itself (i.e. a number corresponding for specific user).
|
||||
|
||||
When ID comes from discord (messages, users, servers, channels...), it also contains the date of when the item was created (or user registered).
|
||||
|
||||
## Stored data
|
||||
|
||||
The following information is stored:
|
||||
|
||||
* invite link, their author ID and the usage count (for invite manager)
|
||||
* server ID along with settings and data from commands (for the functionality of the bot)
|
||||
* user ID along with user settings and data from commands (for the functionality of the bot)
|
||||
* member ID, the number of users invited and the ID of inviter (for invite manager)
|
||||
|
||||
No discord data (not listed in this privacy policy) is saved unless explicitly set via a command. Server data is deletable using the `clear-settings` command, user data can be deleted after contacting the developers in the support server found in `about` command.
|
||||
|
||||
By using the bot, you allow access to the data specified here and all data specified in commands.
|
||||
|
||||
### Statistics
|
||||
|
||||
Following data is stored for statistical purposes (to be shown in website privately to members of server, or anyone, depending on privacy settings).
|
||||
Data retention is 90 days unless specified otherwise.
|
||||
This data will be recorded once (and after) website is publicly available.
|
||||
|
||||
#### Messages
|
||||
|
||||
* ID
|
||||
* author ID
|
||||
* channel ID
|
||||
* Whether the message has attachments, images, embeds, is pinned or is by bot.
|
||||
|
||||
#### User joins/leaves
|
||||
|
||||
* Date and time
|
||||
* user ID
|
||||
* which user invited the user
|
||||
* which invite was used
|
||||
* Whether user left, joined, is a bot, was banned before and similar.
|
||||
|
||||
#### Songs played
|
||||
|
||||
Statistics about which songs the bot played in voice chat or using other ways.
|
||||
|
||||
* Date and time
|
||||
* requester ID (user that requested the song)
|
||||
* song name
|
||||
* source (youtube, spotify, soundcloud or similar link)
|
||||
* metadata about song (it's name, length, author...)
|
||||
|
||||
#### Voice chat activity
|
||||
|
||||
Tracks users when they join and leave voice chat
|
||||
|
||||
* Date and time
|
||||
* user ID
|
||||
* channel ID
|
||||
* Whether they joined or left
|
||||
|
||||
## Contact
|
||||
|
||||
You can request DM from developers using the `request-tunnel` command (in DMs with the bot). You can also join the support server listed in `about` command.
|
||||
|
||||
## Shared data
|
||||
|
||||
We do not share your data with 3rd parties, unless specifically requested by user.
|
||||
21
igni/tips.md
Normal file
21
igni/tips.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
layout: default
|
||||
toc: true
|
||||
footer: (c) Copyright <a href="https://ids.company">ids.company</a> 2021.
|
||||
---
|
||||
# Tip and tricks
|
||||
|
||||
## Command edits
|
||||
|
||||
Any message can be edited and the bot will take it as a new one. You can use this to "edit" commands and the bot will update it's reply. Works for 30 seconds after the message was sent.
|
||||
|
||||
This can be used to update typos in announcements, fixing command name or fixing prefix (editing the message to use correct prefix will run the command).
|
||||
|
||||
Another way to use this to your advantage is to traverse the `settings` command, like (each line can be an edit just adding content):
|
||||
|
||||
* `settings` - lists all the groups
|
||||
* `settings moderation` - lists all settings in `moderation` group
|
||||
* `settings moderation muterole` - shows current value for the setting
|
||||
* `settings moderation muterole muted` - Sets the setting to new value (sets `muterole` setting in `moderation` to the role `muted`)
|
||||
|
||||
**Keep in mind that every message edit is like running a new command.** Remember it especially when banning or doing other destructive actions.
|
||||
14
index.markdown
Normal file
14
index.markdown
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
# Feel free to add content and custom Front Matter to this file.
|
||||
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
|
||||
|
||||
layout: default
|
||||
isTop: true
|
||||
---
|
||||
# Index
|
||||
|
||||
This subdomain is used for as a text-sharing of sorts for my personal use (basically like github gists but on my own domain).
|
||||
|
||||
The following are available groups:
|
||||
|
||||
* [igni](/igni) - All-in-one discord bot
|
||||
Loading…
Reference in a new issue