Compare commits

...

11 commits

Author SHA1 Message Date
b343a2abd0
Updated marmalade crations guide 2024-12-22 20:36:17 +13:00
64e6c6ad38
Updated links. 2024-12-22 20:21:42 +13:00
fce2696d4a
Updated some stuff and the docs version. 2024-12-10 22:06:38 +13:00
1e7f18c765
Removed reference to a deleted module 2024-08-02 18:23:48 +12:00
b656d66e35
Updated repo link 2024-08-02 18:18:11 +12:00
60c06e6968
Updated some pages in the site. 2024-07-27 01:56:10 +12:00
00f595436a
Updated marmalade documentation. 2024-07-22 22:32:15 +12:00
e51002a42b
Fixed some names and links being wrong 2024-06-25 23:34:10 +12:00
4dc93e5871
Updated the documentation
This took way too long
2024-06-25 23:22:36 +12:00
b798bd0d43
Merge branch 'dev' 2024-06-13 02:19:32 +12:00
245ebc4e5a
Massive update. 2024-06-13 02:17:14 +12:00
46 changed files with 1726 additions and 8166 deletions

11
.editorconfig Normal file
View file

@ -0,0 +1,11 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
[*.md]
max_line_length = 120

28
.gitattributes vendored Normal file
View file

@ -0,0 +1,28 @@
# Everything is text by default, unless we say otherwise.
# Also set everything to lf as line ending, because that's just way better.
* text eol=lf
# Images are definitely not text.
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVGs should be handled as text, though.
*.svg text
# Do some GitHub stats trickery.
_vendor/* linguist-vendored=true
# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

23
.gitignore vendored
View file

@ -1,21 +1,8 @@
# build output
dist/
# generated types
.astro/
.hugo_build.lock
# dependencies
node_modules/
_vendor/
public/
resources/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
.vscode/

View file

@ -1,4 +0,0 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}

11
.vscode/launch.json vendored
View file

@ -1,11 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}

73
LICENSE Normal file
View file

@ -0,0 +1,73 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright 2024 toastie_t0ast
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

5
archetypes/default.md Normal file
View file

@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++

View file

@ -1,33 +0,0 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Ellie Docs',
social: {
github: 'https://toastielab.dev/EllieBotDevs/EllieBot-docs',
discord: 'https://discord.gg/etQdZxSyEH',
},
sidebar: [
{
label: 'Ellie v4',
autogenerate: { directory: 'v4' },
},
{
label: 'Ellie v5',
autogenerate: { directory: 'v5' },
},
{
label: 'SupportChild',
autogenerate: { directory: 'supportchild' },
},
{
label: 'Holana',
autogenerate: { directory: 'holana' },
},
],
}),
],
});

View file

@ -0,0 +1,10 @@
+++
archetype = "chapter"
title = "EllieBot Features"
description = "Under this category you can find guides on how to use some of EllieBot's features."
weight = 2
+++
Under this category you can find guides on how to do some things with EllieBot.
{{%children containerstyle="div" style="h2" description="true" %}}

View file

@ -0,0 +1,75 @@
+++
title = "Config"
description = "How to use Ellie's config command"
weight = 6
+++
`.config` gives you a fast and easy way to edit most bot settings/values. Use `.h .config` for explanation.
Use `.config` to see the list of editable config files
Use `.config <config-name>` to see the list of settable properties on that config
Use `.config <config-name> <setting>` to see the current value and description
Use `.config <config-name> <setting> value` to set a new value
All settings are only available if you edit `data/[config-name].yml` files manually.
If you edit the files manually, you can reload configuration with `.configreload <config-name>`
The list below is not complete. Use commands above to see up-to-date list for your version.
## XP
`txt.cooldown` - Sets a timeout value in which a user cannot gain any more xp from sent messages. ( Value is in minutes )
`txt.per_msg` - Sets a value for the amount of xp a user will receive from sending a message.
`voice.per_minute` - Sets how much xp a user will receive from being active in a voice channel.
`voice.max_minutes` - Restricts a users xp gain to a certain amount of time spent in a voice channel.
*more settings may be available in `data/xp.yml` file*
## Games
`trivia.min_win_req` - Restricts a user's ability to make a trivia game with a win requirement less than the set value.
`trivia.currency_reward` - Sets the amount of currency a user will win if they place first in a completed trivia game.
`hangman.currency_reward` - Sets the amount of currency a user will win if they win a game of hangman.
`chatbot` - Sets which chatbot API the bot should use, values: `gpt3`, `cleverbot`.
`gpt.model` - Sets which GPT-3 model the bot should use, values: `ada001`, `babbage001`, `curie001`, `davinci003`.
`gpt.max_tokens` - Sets the limit of tokens GPT-3 can use per call. Find out more about tokens [here](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them).
*more settings may be available in `data/games.yml` file*
## Bot
`color.ok` - Sets a hex color that will be shown on the side bar of a successful command.
`color.error` - Sets a hex color that will be shown on the side bar of an unsuccessful command.
`color.pending` - Sets a hex color that will be shown on the side bar of a command that is currently in progress.
`help.text` - The text a user is DM'd when they invoke the `.h` command.
`help.dmtext` - The text a user will receive when they DM the bot directly.
`console.type` - Sets the style in which commands will show up in your console, values: `Simple`, `Normal`, `None`.
`locale` - Sets your native bot language, run the `.langli` command in a Discord channel for a full list of language options.
`prefix` - Sets default prefix for your bot.
*more settings may be available in `data/bot.yml` file*
## Gambling
`currency.name` - Sets the name for your bot's currency.
`currency.sign` - Sets the icon for your currency.
`minbet` - Minimum amount users can bet
`maxbet` - Maximum amount users can bet. Set 0 for unlimited
`gen.min` - Sets the minimum amount that can be spawned with `.gc` active.
`gen.max` - Sets the maximum amount that can be spawned with `.gc` active.
`gen.cd` - Sets a cooldown on how often a flower can spawn with `.gc` active ( Value is in seconds ).
`gen.chance` - Sets the likelihood that flowers will spawn with `.gc`. Value: ( 0.02 = 2% | 1 + 100% ).
`gen.has_pw` - Toggles wether the generated flowers will have a password at the top left of the image. Value: `true` or `false`
`bf.multi` - Sets the amount fo currency a user will win off of a winning a bet flip.
`waifu.min_price` - Sets the minimum price a user must pay to claim a user as their waifu.
`waifu.multi.reset` - Sets a multiplier for the `.waifureset` command.
`waifu.multi.crush_claim` - Sets a discount for a user that is claiming another user that has their affinity set to them.
`waifu.multi.normal_claim` - Amount a user would have to spend to claim a waifu with no affinity set.
`waifu.multi.divorce_value` - Sets how much a user would get if they divorce a waifu.
`waifu.multi.all_gifts` - Sets how much of a gifts value will be added to the value of the gifted waifu.
`waifu.multi.gift_effect` - Sets a bonus amount that a waifu will receive if they have their affinity set to the gifter.
`decay.percent` - Sets the percentage to decay all users currency daily.
`decay.maxdecay` - Sets the maximum a amount that a user's currency can decay in a day.
`decay.threshold` - Sets the minimum amount that a user must have to be eligible to receive a decay.
*more settings may be available in `data/gambling.yml` file*

View file

@ -0,0 +1,73 @@
+++
title = "Basic Creds"
description = "How to configure EllieBot using the creds.yml file"
weight = 1
+++
## Creds Guide
This guide will show you how to create your own discord bot, invite it to your server, and copy it's credentials to your `creds.yml` in order to run your bot.
- Start by opening your creds.yml
- If you're on a windows installer version, click on the creds button next to your bot's RUN button.
- If you're on linux from source or windows from source version, open `elliebot/output/creds.yml`. Please use visual studio code, notepad++ or another code editor. Usage of notepad is discouraged.
![Create a bot application and copy token to creds.yml file](https://cdn.elliebot.net/bot-creds-guide.gif)
1. Go to [the Discord developer application page][DiscordApp].
2. Log in with your Discord account.
3. Click **New Application**.
4. Fill out the `Name` field however you like.
5. Go to the **Bot** tab on the left sidebar.
6. Click on the `Add a Bot` button and confirm that you do want to add a bot to this app.
7. **Optional:** Add bot's avatar and description.
8. Copy your Token to `creds.yml` as shown above.
9. Scroll down to the **`Privileged Gateway Intents`** section
- **Enable the following:**
- **PRESENCE INTENT**
- **SERVER MEMBERS INTENT**
- **MESSAGE CONTENT INTENT**
These are required for a number of features to function properly, and all should be on.
##### Getting Owner ID:
- Go to your Discord server and attempt to mention yourself, but put a backslash at the start
*(to make it slightly easier, add the backslash after the mention has been typed)*.
- For example, the message `\@toastie_t0ast` will appear as `<@234542843732033537>` after you send the message.
- The message will appear as a mention if done correctly. Copy the numbers from it **`234542843732033537`** and replace the big number on the `OwnerIds` section with your user ID.
- Save the `creds.yml` file.
- If done correctly, you should now be the bot owner. You can add multiple owners by adding them below the first one. Indentation matters.
For a single owner, it should look like this:
```yml
OwnerIds:
- 105635576866156544
```
For multiple owners, it should look like this:
```yml
OwnerIds:
- 105635123466156544
- 234542843732033537
- 341420590009417729
```
#### Inviting your bot to your server
![Invite the bot to your server](https://cdn.elliebot.net/bot-invite-guide.gif)
- On the **General Information** tab, copy your `Application ID` from your [applications page][DiscordApp].
- Replace the `YOUR_CLIENT_ID_HERE` in this link:
`https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=66186303` with your `Client ID`
- The link should now look something like this:
`https://discord.com/oauth2/authorize?client_id=123123123123&scope=bot&permissions=66186303`
- Access that newly created link, pick your Discord server, click `Authorize` and confirm with the captcha at the end
- The bot should now be in your server
That's it! You may now go back to the installation guide you were following before 🎉
[DiscordApp]: https://discordapp.com/developers/applications/me

View file

@ -1,14 +1,14 @@
---
title: Ellie v4 Expressions
---
# Expressions
+++
title = "Ellie Expressions"
description = "How to use Ellie's expressions system"
weight = 4
+++
### Important
- For modifying **global** custom reactions, the ones which will work across all the servers Ellie is connected to, you **must** be a Bot Owner.
- For modifying **global** custom reactions, the ones which will work across all the servers Ellie is connected to, you **must** be a Bot Owner.
You must also use the commands for adding, deleting and listing these reactions in a direct message with the bot.
- For modifying **local** custom reactions, the ones which will only work on the server that they are added on, it is required to have the **Administrator** permission.
- For modifying **local** custom reactions, the ones which will only work on the server that they are added on, it is required to have the **Administrator** permission.
You must also use the commands for adding, deleting and listing these reactions in the server you want the custom reactions to work on.
### Commands and Their Use
@ -45,4 +45,4 @@ Now if you try to trigger `/o/`, it won't print anything even if there is a glob
### Placeholders!
To learn about placeholders, go [here](placeholders.md)
To learn about placeholders, go [here](placeholders.md)

View file

@ -1,8 +1,9 @@
---
title: Ellie v4 Permissions System
---
+++
title = "Ellie Permissions System"
description = "How to use Ellie's permissions system"
weight = 3
+++
# Permissions Overview
Have you ever felt confused or even overwhelmed when trying to set Ellie's permissions? In this guide we will be explaining **how to use the permission commands correctly** and even **cover a few common questions**! Every command we discuss here can be found in the [Commands List].
@ -12,7 +13,7 @@ Permissions are very handy at setting who can use what commands in a server. All
Several commands still require that you have the correct permissions on Discord to be able to use them, so for users to be able to use commands like `'kick` and `'voicemute`, they need **Kick** and **Mute Members** server permissions, respectively.
With the permissions system it possible to restrict who can skip the current song, pick NadekoFlowers or use the NSFW module.
With the permissions system it possible to restrict who can skip the current song, pick EllieMoney or use the NSFW module.
## First Time Setup
@ -68,15 +69,6 @@ To allow users to only see the current song and have a DJ role for queuing follo
4. `'rm Music enable DJ`
- Enables all music commands only for the DJ role
#### How do I create a NSFW role?
Say you want to only enable NSFW commands for a specific role, just do the following two steps.
1. `'sm NSFW disable`
- Disables the NSFW module from being used
2. `'rm NSFW enable Lewd`
- Enables usage of the NSFW module for the Lewd role
#### How do I disable Expressions from triggering?
If you don't want server or global Expressions, just block the module that controls their usage:

View file

@ -1,8 +1,8 @@
---
title: Ellie v4 Placeholders
---
# Placeholders
+++
title = "Ellie Placeholders"
description = "How to use Ellie's placeholders system"
weight = 5
+++
Placeholders are used in Quotes, Expressions, Greet/Bye messages, playing statuses, and a few other places.
@ -12,8 +12,12 @@ Some features have their own specific placeholders which are noted in that featu
## Usual placeholders
!!! Note
If you're using placeholders in embeds, don't use %user.mention% and %bot.mention% in titles, footers and field names. They will not show properly.
{{% notice style="note" title="Important note concerning embeds:" %}}
If you're using placeholders in embeds,
don't use %user.mention% and %bot.mention% in titles,
footers and field names.
They will not show properly.
{{% /notice %}}
### Bot placeholders
@ -34,7 +38,7 @@ Some features have their own specific placeholders which are noted in that featu
- `%server.members%` - Member count
- `%server.boosters%` - Number of users boosting the server
- `%server.boost_level%` - Server Boost level
- `%server.time%` - Server time (requires `'timezone` to be set)
- `%server.time%` - Server time (requires `.timezone` to be set)
### Channel placeholders
@ -42,7 +46,7 @@ Some features have their own specific placeholders which are noted in that featu
- `%channel.name%` - Channel name
- `%channel.id%` - Channel ID
- `%channel.created%` - Channel creation date
- `%channel.nsfw%` - Returns either `True` or `False`, depending on if the channel is designated as NSFW using discord
- `%channel.nsfw%` - Returns either `True` or `False`, depending on if the channel is designated as age-restricted in discord
- `%channel.topic%` - Channel topic
### User placeholders
@ -58,21 +62,21 @@ Some features have their own specific placeholders which are noted in that featu
- `%user.joined_time%` - Account join time (local time)
- `%user.joined_date%` - Account join date
### Ban message placeholders
### Ban message placeholders
- `%ban.mod%` - Full name of the moderator who performed the ban
- `%ban.mod.fullname%` - Full name of the moderator who performed the ban
- `%ban.mod.mention%` - Moderator's mention
- `%ban.mod.name%` - Name of the moderator - Admin
- `%ban.mod.discrim%` - Discriminator of the moderator - 1234
- `%ban.user%` - Full name of the banned user
- `%ban.user.fullname%` - Full name of the banned user
- `%ban.user.name%` - Name of the banned user
- `%ban.user.discrim%` - Discriminator of the banned user
- `%ban.reason%` - Reason for the ban, if provided
- `%ban.duration%` - Duration of the ban in the form Days.Hours:Minutes (6.05:04)
- `%ban.mod%` - Full name of the moderator who performed the ban
- `%ban.mod.fullname%` - Full name of the moderator who performed the ban
- `%ban.mod.mention%` - Moderator's mention
- `%ban.mod.name%` - Name of the moderator - Admin
- `%ban.mod.discrim%` - Discriminator of the moderator - 1234
- `%ban.user%` - Full name of the banned user
- `%ban.user.fullname%` - Full name of the banned user
- `%ban.user.name%` - Name of the banned user
- `%ban.user.discrim%` - Discriminator of the banned user
- `%ban.reason%` - Reason for the ban, if provided
- `%ban.duration%` - Duration of the ban in the form Days.Hours:Minutes (6.05:04)
### Shard stats placeholders
### Shard stats placeholders
- `%shard.servercount%` - Server count on current shard
- `%shard.usercount%` - Combined user count on current shard

View file

@ -0,0 +1,239 @@
+++
title = "Advanced Creds"
description = "Setting up your API keys"
weight = 2
+++
## Setting up your API keys
This part is completely optional, **however it's necessary for music and a few other features to work properly**.
- **GoogleAPIKey**
- Required for Youtube Song Search, Playlist queuing, and a few more things.
- Follow these steps on how to setup Google API keys:
- Go to [Google Console][Google Console] and log in.
- Create a new project (name does not matter).
- Once the project is created, go into `Library`
- Under the `YouTube APIs` section
- Select `YouTube Data API v3`,
- Click enable.
- Search for `Custom Search API`
- Select `Custom Search API`,
- Click enable.
- Open up the `Navigation menu` on the top right with the three lines.
- select `APIs & Services`, then select `Credentials`,
- Click `Create Credentials` button,
- Click on `API Key`
- A new window will appear with your `Google API key`
*NOTE: You don't really need to click on `RESTRICT KEY`, just click on `CLOSE` when you are done.*
- Copy the key.
- Open up `creds.yml` and look for `GoogleAPIKey`, paste your API key after the `:`.
- It should look like this:
```yml
GoogleApiKey: 'AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM'
```
- **MashapeKey**
- Required for Hearthstone cards.
- Api key obtained on https://rapidapi.com (register -> go to MyApps -> Add New App -> Enter Name -> Application key)
- Copy the key and paste it into `creds.yml`
- **OsuApiKey**
- Required for Osu commands
- You can get this key [here](https://osu.ppy.sh/p/api).
- **CleverbotApiKey**
- Required if you want to use Cleverbot. It's currently a paid service.
- You can get this key [here](http://www.cleverbot.com/api/).
- **PatreonAccessToken**
- For Patreon creators only.
- **PatreonCampaignId**
- For Patreon creators only. Id of your campaign.
- **TwitchClientId and TwitchClientSecret**
- Mandatory for following twitch streams with `.twitch` (or `.stadd` with twitch link)
- Go to [apps page](https://dev.twitch.tv/console) on twitch and register your application.
- You need 2FA enabled on twitch in order to create an application
- You can set `http://localhost` as the OAuth Redirect URL (and press Add button)
- Select `Chat Bot` from the Category dropdown
- Once created, `click Manage`
- Click `New Secret` and select `OK` in the popup
**Note: You will need to generate a new Client Secret everytime you exit the page**
- Copy both to your creds.yml as shown below
```yml
twitchClientId: 516tr61tr1qweqwe86trg3g
twitchClientSecret: 16tr61tr1q86tweqwe
```
- **LocationIqApiKey**
- Optional. Used only for the `.time` command. https://locationiq.com api key (register and you will receive the token in the email).
- **TimezoneDbApiKey**
- Optional. Used only for the `.time` command. https://timezonedb.com api key (register and you will receive the token in the email **YOU HAVE TO ACTIVEATE IT AFTER YOU GET IT**).
- **CoinmarketcapApiKey**
- Optional. Used only for the `.crypto` command. You can use crypto command without it, but you might get ratelimited from time to time, as all self-hosters share the default api key. https://pro.coinmarketcap.com/
##### Additional Settings
- **TotalShards**
- Required if the bot will be connected to more than 2500 servers.
- Most likely unnecessary to change until your bot is added to more than 2500 servers.
- **RedisOptions**
- Required if the Redis instance is not on localhost or on non-default port.
- You can find all available options [here](https://stackexchange.github.io/StackExchange.Redis/Configuration.html).
- **RestartCommand**
- Required if you want to be able to use the `.restart` command
- If you're using the CLI installer or Linux/OSX, it's easier and more reliable setup Ellie with auto-restart and just use `.die`
For Windows (Updater), add this to your `creds.yml`
```yml
RestartCommand:
Cmd: "EllieBot.exe"
args: "{0}"
```
For Windows (Source), Linux or OSX, add this to your `creds.yml`
```yml
RestartCommand:
Cmd: dotnet
Args: "EllieBot.dll -- {0}"
```
---
#### End Result
**This is an example of how the `creds.yml` looks like with multiple owners, the restart command (optional) and some of the API keys (also optional):**
```yml
# DO NOT CHANGE
version: 4
# Bot token. Do not share with anyone ever -> https://discordapp.com/developers/applications/
token: 'MTE5Nzc3MDIxMzE5NTc3NjEw.VlhNCw.BuqJFyzdIUAK1PRf1eK1Cu89Jew'
# List of Ids of the users who have bot owner permissions
# **DO NOT ADD PEOPLE YOU DON'T TRUST**
ownerIds:
- 105635123466156544
- 145521851676884992
- 341420590009417729
# The number of shards that the bot will running on.
# Leave at 1 if you don't know what you're doing.
totalShards: 1
# Login to https://console.cloud.google.com, create a new project, go to APIs & Services -> Library -> YouTube Data API and enable it.
# Then, go to APIs and Services -> Credentials and click Create credentials -> API key.
# Used only for Youtube Data Api (at the moment).
googleApiKey: 'AIzaSyDScfdfdfi1sdlWQOWxxxxxbk0oWMEzM'
# Settings for voting system for discordbots. Meant for use on global Ellie.
votes:
url: ''
key: ''
# Patreon auto reward system settings.
# go to https://www.patreon.com/portal -> my clients -> create client
patreon:
# Access token. You have to manually update this 1st of each month by refreshing the token on https://patreon.com/portal
accessToken: ''
# Unused atm
refreshToken: ''
# Unused atm
clientSecret: ''
# Campaign ID of your patreon page. Go to your patreon page (make sure you're logged in) and type "prompt('Campaign ID', window.patreon.bootstrap.creator.data.id);" in the console. (ctrl + shift + i)
campaignId: ''
# Api key for sending stats to DiscordBotList.
botListToken: ''
# Official cleverbot api key.
cleverbotApiKey: ''
# Redis connection string. Don't change if you don't know what you're doing.
redisOptions: localhost:6379,syncTimeout=30000,responseTimeout=30000,allowAdmin=true,password=
# Database options. Don't change if you don't know what you're doing. Leave null for default values
db:
# Database type. Only sqlite supported atm
type: sqlite
# Connection string. Will default to "Data Source=data/EllieBot.db"
connectionString: Data Source=data/EllieBot.db
# Address and port of the coordinator endpoint. Leave empty for default.
# Change only if you've changed the coordinator address or port.
coordinatorUrl: http://localhost:3442
# Api key obtained on https://rapidapi.com (go to MyApps -> Add New App -> Enter Name -> Application key)
rapidApiKey: 4UrKpcWXcxxxxxxxxxxxxxxp1Q8kI6jsn32xxxoVWiY7
# https://locationiq.com api key (register and you will receive the token in the email).
# Used only for .time command.
locationIqApiKey:
# https://timezonedb.com api key (register and you will receive the token in the email).
# Used only for .time command
timezoneDbApiKey:
# https://pro.coinmarketcap.com/account/ api key. There is a free plan for personal use.
# Used for cryptocurrency related commands.
coinmarketcapApiKey:
# Api key used for Osu related commands. Obtain this key at https://osu.ppy.sh/p/api
osuApiKey: 4c8c8fdffdsfdsfsdfsfa33f3f3140a7d93320d6
# Optional Trovo client id.
# You should use this if Trovo stream notifications stopped working or you're getting ratelimit errors.
trovoClientId:
# Obtain by creating an application at https://dev.twitch.tv/console/apps
twitchClientId: jf2w6kkyrlzfl6mp1b4k25h4jr6b2o
# Obtain by creating an application at https://dev.twitch.tv/console/apps
twitchClientSecret: 16tr61tr1q86tweqwe
# Command and args which will be used to restart the bot.
# Only used if bot is executed directly (NOT through the coordinator)
# placeholders:
# {0} -> shard id
# {1} -> total shards
# Linux default
# cmd: dotnet
# args: "EllieBot.dll -- {0}"
# Windows default
# cmd: "EllieBot.exe"
# args: "{0}"
restartCommand:
cmd:
args:
```
---
## Database
Ellie saves all settings and data in the database file `EllieBot.db`, located in:
- Windows (Updater): `system/data` (can be easily accessed through the `Data` button on the updater)
- Windows (Source), Linux and OSX: `elliebot/output/data/EllieBot.db`
In order to open it you will need [SQLite Browser](http://sqlitebrowser.org/).
*NOTE: You don't have to worry if you don't have the `EllieBot.db` file, it gets automatically created once you successfully run the bot for the first time.*
**To make changes to the database on windows:**
- Shut your bot down.
- Copy the `EllieBot.db` file to someplace safe. (Back up)
- Open it with SQLite Browser.
- Go to the **Browse Data** tab.
- Click on the **Table** drop-down list.
- Choose the table you want to edit.
- Click on the cell you want to edit.
- Edit it on the right-hand side.
- Click on **Apply**.
- Click on **Write Changes**.
---
## Sharding your bot
To run a sharded bot, you will want to run `src/EllieBot.Coordinator` project.
Shards communicate with the coordinator using gRPC
To configure your Coordinator, you will need to edit the `src/EllieBot.Coordinator/coord.yml` file
```yml
# total number of shards
TotalShards: 3
# How often do shards ping their state back to the coordinator
RecheckIntervalMs: 5000
# Command to run the shard
ShardStartCommand: dotnet
# Arguments to run the shard
# {0} = shard id
# {1} = total number of shards
ShardStartArgs: ../../output/EllieBot.dll -- {0} {1}
# How long does it take for the shard to be forcefully restarted once it stops reporting its state
UnresponsiveSec: 30
```
[Google Console]: https://console.developers.google.com
[DiscordApp]: https://discordapp.com/developers/applications/me
[Invite Guide]: https://tukimoop.pw/s/guide.html

View file

@ -0,0 +1,10 @@
+++
archetype = "chapter"
title = "EllieBot Install guides"
description = "Under this category you can find guides on how to host your own EllieBot."
weight = 1
+++
Under this category you can find guides on how to host your own EllieBot.
{{%children containerstyle="div" style="h2" description="true" %}}

View file

@ -0,0 +1,378 @@
+++
title = "Linux Guide"
description = "How to set up EllieBot on Linux"
weight = 4
+++
# Setting up EllieBot on Linux
| Table of Contents |
| :-------------------------------------------------- |
| [Linux From Source] |
| [Source Update Instructions] |
| [Linux Release] |
| [Release Update Instructions] |
| [Tmux (Preferred Method)] |
| [Systemd] |
| [Systemd + Script] |
| [Setting up Ellie on a VPS (Digital Ocean)] |
#### Operating System Compatibility
##### Compatible operating systems:
- Ubuntu: 20.04, 22.04, 24.04
- Mint: 19, 20, 21
- Debian: 10, 11, 12
- RockyLinux: 8, 9
- AlmaLinux: 8, 9
- openSUSE Leap: 15.5, 15.6 & Tumbleweed
- Fedora: 38, 39, 40, 41, 42
## Linux From Source
##### Migration from v3 -> v5
Follow the following few steps only if you're migrating from v3. If not, skip to installation instructions.
Use the new installer script: `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
> - Install prerequisites (type `1` and press `enter`)
> - Download (type `2` and press `enter`)
> - Run (type `3` and press `enter`)
> - Done
##### Installation Instructions
Open Terminal (if you're on an installation with a window manager) and navigate to the location where you want to install the bot (for example `cd ~`)
1. Download and run the **new** installer script `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
2. Install prerequisites (type `1` and press enter)
3. Download the bot (type `2` and press enter)
4. Exit the installer (type `6` and press enter)
5. Copy the creds.yml template `cp elliebot/output/creds_example.yml elliebot/output/creds.yml`
6. Open `elliebot/output/creds.yml` with your favorite text editor. We will use nano here
- `nano elliebot/output/creds.yml`
7. [Click here to follow creds guide](../Features/creds-guide)
- After you're done, you can close nano (and save the file) by inputting, in order
- `CTRL` + `X`
- `Y`
- `Enter`
8. Run the installer script again `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
9. Run the bot (type `3` and press enter)
##### Source Update Instructions
1. ⚠ Stop the bot ⚠
2. Update and run the **new** installer script `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
3. Update the bot (type `2` and press enter)
4. Run the bot (type `3` and press enter)
5. 🎉
## **⚠ IF YOU ARE FOLLOWING THE GUIDE ABOVE, IGNORE THIS SECTION ⚠**
## Linux Release
###### Prerequisites
1. (Optional) Installing Redis
- ubuntu installation command: `sudo apt-get install redis-server`
2. Playing music requires `ffmpeg`, `libopus`, `libsodium` and `yt-dlp` (which in turn requires python3)
- Ubuntu installation command: `sudo apt-get install ffmpeg libopus0 opus-tools libopus-dev libsodium-dev -y`
- yt-dlp installation command: `sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp && sudo chmod a+rx /usr/local/bin/yt-dlp`
3. Make sure your python is version 3+ with `python --version`
- if it's not, you can install python 3 and make it the default with: `sudo apt-get install python3.8 python-is-python3`
*You can use ellie bash script [prerequisites installer](https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/e-prereq.sh) as a reference*
##### Installation Instructions
1. Download the latest release from <https://toastielab.dev/EllieBotDevs/elliebot/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
2. Untar it
- ⚠ Make sure that you change X.XX.X to the same series of numbers as in step 1!
- `tar xf X.XX.X-linux-x64-build.tar`
3. Rename the `elliebot-linux-x64` to `elliebot`
- `mv elliebot-linux-x64 elliebot`
4. Move into elliebot directory and make EllieBot executable
- `cd elliebot && chmod +x EllieBot`
5. Copy the creds.yml template
- `cp creds_example.yml creds.yml`
6. Open `creds.yml` with your favorite text editor. We will use nano here
- `nano elliebot/output/creds.yml`
8. [Click here to follow creds guide](../Features/creds-guide)
- After you're done, you can close nano (and save the file) by inputting, in order
- `CTRL` + `X`
- `Y`
- `Enter`
9. Run the bot
- `./EllieBot`
##### Release Update Instructions
1. Stop the bot
2. Download the latest release from <https://toastielab.dev/EllieBotDevs/elliebot/releases>
- Look for the file called "x.x.x-linux-x64-build.tar" (where `X.X.X` is a version, for example 3.0.4) and download it
3. Untar it
- ⚠ Make sure that you change `X.X.X` to the same series of numbers as in step 2!
- `tar xf x.x.x-linux-x64-build.tar`
4. Rename the old elliebot directory to elliebot-old (remove your old backup first if you have one, or back it up under a different name)
- `rm -rf elliebot-old 2>/dev/null`
- `mv elliebot elliebot-old`
5. Rename the new elliebot directory to elliebot
- `mv elliebot-linux-x64 elliebot`
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
- ⚠ If you've modified said files, back them up instead
- `rm elliebot-old/data/aliases.yml`
- `rm -r elliebot-old/data/strings`
7. Copy old data
- `cp -RT elliebot-old/data/ elliebot/data`
8. Copy creds.yml
- `cp elliebot-old/creds.yml elliebot/`
9. Move into elliebot directory and make the EllieBot executable
- `cd elliebot && chmod +x EllieBot`
10. Run the bot
- `./EllieBot`
🎉 Enjoy
##### Steps 3 - 9 as a single command
Don't forget to change X.XX.X to match step 2.
```sh
tar xf X.XX.X-linux-x64-build.tar && \
rm -rf elliebot-old 2>/dev/null && \
mv elliebot elliebot-old && \
mv elliebot-linux-x64 elliebot && \
rm elliebot-old/data/aliases.yml && \
rm -r elliebot-old/data/strings && \
cp -RT elliebot-old/data/ elliebot/data && \
cp elliebot-old/creds.yml elliebot/ && \
cd elliebot && chmod +x EllieBot
```
## Running Ellie
While there are two run modes built into the installer, these options only run Ellie within the current session. Below are 3 methods of running Ellie as a background process.
### Tmux Method (Preferred)
Using `tmux` is the simplest method, and is therefore recommended for most users.
**Before proceeding, make sure your bot is not running by either running `.die` in your Discord server or exiting the process with `Ctrl+C`.**
If you are presented with the installer main menu, exit it by choosing Option `8`.
1. Create a new session: `tmux new -s ellie`
The above command will create a new session named **ellie** *(you can replace “ellie” with anything you prefer, it's your session name)*.
2. Run the installer: `bash linuxAIO.sh`
3. There are a few options when it comes to running Ellie.
- Run `3` to *Run the bot normally*
- Run `4` to *Run the bot with Auto Restart* (This is may or may not work)
4. If option `4` was selected, you have the following options
```
1. Run Auto Restart normally without updating EllieBot.
2. Run Auto Restart and update EllieBot.
3. Exit
Choose:
[1] to Run EllieBot with Auto Restart on "die" command without updating.
[2] to Run with Auto Updating on restart after using "die" command.
```
- Run `1` to restart the bot without updating. (This is done using the `.die` command)
- Run `2` to update the bot upon restart. (This is also done using the `.die` command)
5. That's it! to detatch the tmux session:
- Press `Ctrl` + `B`
- Then press `D`
Now check your Discord server, the bot should be online. Ellie should now be running in the background of your system.
To re-open the tmux session to either update, restart, or whatever, execute `tmux a -t ellie`. *(Make sure to replace "ellie" with your session name. If you didn't change it, leave it as it.)*
### Systemd
Compared to using tmux, this method requires a little bit more work to set up, but has the benefit of allowing Ellie to automatically start back up after a system reboot or the execution of the `.die` command.
1. Navigate to the project's root directory
- Project root directory location example: `/home/user/elliebot/`
2. Use the following command to create a service that will be used to start Ellie:
```bash
echo "[Unit]
Description=EllieBot service
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=2
[Service]
Type=simple
User=$USER
WorkingDirectory=$PWD/output
# If you want Ellie to be compiled prior to every startup, uncomment the lines
# below. Note that it's not neccessary unless you are personally modifying the
# source code.
#ExecStartPre=/usr/bin/dotnet build ../src/EllieBot/EllieBot.csproj -c Release -o output/
ExecStart=/usr/bin/dotnet EllieBot.dll
Restart=on-failure
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=EllieBot
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/ellie.service
```
3. Make the new service available:
- `sudo systemctl daemon-reload`
4. Start Ellie:
- `sudo systemctl start ellie.service && sudo systemctl enable ellie.service`
### Systemd + Script
This method is similar to the one above, but requires one extra step, with the added benefit of better error logging and control over what happens before and after the startup of Ellie.
1. Locate the project and move to its parent directory
- Project location example: `/home/user/elliebot/`
- Parent directory example: `/home/user/`
2. Use the following command to create a service that will be used to execute `EllieRun.sh`:
```bash
echo "[Unit]
Description=EllieBot service
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=2
[Service]
Type=simple
User=$USER
WorkingDirectory=$_WORKING_DIR
ExecStart=/bin/bash EllieRun.sh
Restart=on-failure
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=EllieBot
[Install]
WantedBy=multi-user.target" | sudo tee /etc/systemd/system/ellie.service
```
3. Make the new service available:
- `sudo systemctl daemon-reload`
4. Use the following command to create a script that will be used to start Ellie:
```bash
{
echo '#!/bin/bash'
echo ""
echo "echo \"Running EllieBot in the background with auto restart\"
yt-dlp -U
# If you want Ellie to be compiled prior to every startup, uncomment the lines
# below. Note that it's not necessary unless you are personally modifying the
# source code.
#echo \"Compiling EllieBot...\"
#cd \"$PWD\"/elliebot
#dotnet build src/EllieBot/EllieBot.csproj -c Release -o output/
echo \"Starting EllieBot...\"
while true; do
if [[ -d $PWD/elliebot/output ]]; then
cd $PWD/elliebot/output || {
echo \"Failed to change working directory to $PWD/elliebot/output\" >&2
echo \"Ensure that the working directory inside of '/etc/systemd/system/ellie.service' is correct\"
echo \"Exiting...\"
exit 1
}
else
echo \"$PWD/elliebot/output doesn't exist\"
exit 1
fi
dotnet EllieBot.dll || {
echo \"An error occurred when trying to start NadekBot\"
echo \"Exiting...\"
exit 1
}
echo \"Waiting for 5 seconds...\"
sleep 5
yt-dlp -U
echo \"Restarting EllieBot...\"
done
echo \"Stopping EllieBot...\""
} > EllieRun.sh
```
5. Start Ellie:
- `sudo systemctl start ellie.service && sudo systemctl enable ellie.service`
### Setting up Ellie on a Linux VPS (Digital Ocean Droplet)
If you want Ellie to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Ellie on Linux Digital Ocean Droplet using the link [DigitalOcean](https://m.do.co/c/1bb1db830f41) (by using this link, you will get **$10 credit** and also support Ellie)
To set up the VPS, please select the options below
```
These are the min requirements you must follow:
OS: Any between Ubuntu, Fedora, and Debian
Plan: Basic
CPU options: regular with SSD
1 GB / 1 CPU
25 GB SSD Disk
1000 GB transfer
Note: You can select the cheapest option with 512 MB /1 CPU but this has been a hit or miss.
Datacenter region: Choose one depending on where you are located.
Authentication: Password or SSH
(Select SSH if you know what you are doing, otherwise choose password)
```
**Setting up EllieBot**
Assuming you have followed the link above to setup an account and a Droplet with a 64-bit operational system on Digital Ocean and got the `IP address and root password (in your e-mail)` to login, it's time to get started.
**This section is only relevant to those who want to host Ellie on DigitalOcean. Go through this whole section before setting the bot up.**
#### Prerequisites
- Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
- Download [WinSCP](https://winscp.net/eng/download.php) *(optional)*
- [Create and invite the bot](../Features/creds-guide).
#### Starting up
- **Open PuTTY** and paste or enter your `IP address` and then click **Open**.
If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window.
- Now for **login as:**, type `root` and press enter.
- It should then ask for a password. Type the `root password` you have received in your e-mail address, then press Enter.
If you are running your droplet for the first time, it will most likely ask you to change your root password. To do that, copy the **password you've received by e-mail** and paste it on PuTTY.
- To paste, just right-click the window (it won't show any changes on the screen), then press Enter.
- Type a **new password** somewhere, copy and paste it on PuTTY. Press Enter then paste it again.
**Save the new password somewhere safe.**
After that, your droplet should be ready for use. [Follow the guide from the beginning](#linux-from-source) to set Ellie up on your newly created VPS.
[Linux From Source]: #linux-from-source
[Source Update Instructions]: #source-update-instructions
[Linux Release]: #linux-release
[Release Update Instructions]: #release-update-instructions
[Tmux (Preferred Method)]: #tmux-preferred-method
[Systemd]: #systemd
[Systemd + Script]: #systemd-script
[Setting up Ellie on a VPS (Digital Ocean)]: #setting-up-ellie-on-a-linux-vps-digital-ocean-droplet

View file

@ -0,0 +1,131 @@
+++
title = "MacOS Guide"
description = "How to set up EllieBot on MacOS"
weight = 5
+++
## MacOS From Source
Open Terminal (if you don't know how to, click on the magnifying glass on the top right corner of your screen and type **Terminal** on the window that pops up) and navigate to the location where you want to install the bot (for example `cd ~`)
##### Installing Homebrew, wget and dotnet
###### Homebrew/wget
*Skip this step if you already have homebrew installed*
- Copy and paste this command, then press Enter:
- `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
- Install wget
- `brew install wget`
###### Dotnet
- Download [.net8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0)
- Open the `.pkg` file you've downloaded and install it.
- Run this command in Terminal. There might be output. If there is, disregard it. (copy-paste the entire block)
```bash
sudo mkdir /usr/local/bin
sudo mkdir /usr/local/lib
```
- Run this command in Terminal. There won't be any output. (copy-paste the entire block):
```bash
sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin
sudo ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
sudo ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
```
##### Installation Instructions
1. Download and run the **new** installer script `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
2. Install prerequisites (type `1` and press enter)
3. Download the bot (type `2` and press enter)
4. Exit the installer in order to set up your `creds.yml`
5. Copy the creds.yml template
`cp elliebot/output/creds_example.yml elliebot/output/creds.yml`
6. Open `elliebot/output/creds.yml` with your favorite text editor. We will use nano here
- `nano elliebot/output/creds.yml`
7. [Enter your bot's token](#creds-guide)
- After you're done, you can close nano (and save the file) by inputting, in order
- `CTRL`+`X`
- `Y`
- `Enter`
8. Run the bot (type `3` and press enter)
##### Update Instructions
1. ⚠ Stop the bot
2. Update and run the **new** installer script `cd ~ && wget -N https://toastielab.dev/EllieBotDevs/ellie-bash-installer/raw/branch/v5/linuxAIO.sh && bash linuxAIO.sh`
3. Update the bot (type `2` and press enter)
4. Run the bot (type `3` and press enter)
5. 🎉
## MacOS Manual Release installation instructions
⚠ IF YOU ARE FOLLOWING THE GUIDE ABOVE, IGNORE THIS SECTION ⚠
##### Installation Instructions
1. Download the latest release from <https://toastielab.dev/EllieBotDevs/elliebot/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
2. Untar it
⚠ Make sure that you change X.XX.X to the same series of numbers as in step 1!
- `tar xf X.XX.X-linux-x64-build.tar`
3. Rename the `elliebot-linux-x64` to `elliebot`
- `mv elliebot-linux-x64 elliebot`
4. Move into elliebot directory and make EllieBot executable
- `cd elliebot && chmod +x EllieBot`
5. Copy the creds.yml template
- `cp creds_example.yml creds.yml`
6. Open `creds.yml` with your favorite text editor. We will use nano here
- `nano elliebot/output/creds.yml`
8. [Enter your bot's token](#creds-guide)
- After you're done, you can close nano (and save the file) by inputting, in order
- `CTRL`+`X`
- `Y`
- `Enter`
9. Run the bot
- `./EllieBot`
##### Update Instructions
1. Stop the bot
2. Download the latest release from <https://toastielab.dev/EllieBotDevs/elliebot/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" (where X.XX.X is a series of numbers) and download it
3. Untar it
⚠ Make sure that you change X.XX.X to the same series of numbers as in step 2!
- `tar xf 2.99.8-linux-x64-build.tar`
4. Rename the old elliebot directory to elliebot-old (remove your old backup first if you have one, or back it up under a different name)
- `rm -rf elliebot-old 2>/dev/null`
- `mv elliebot elliebot-old`
5. Rename the new elliebot directory to elliebot
- `mv elliebot-linux-x64 elliebot`
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
⚠ If you've modified said files, back them up instead
- `rm elliebot-old/data/aliases.yml`
- `rm -r elliebot-old/data/strings`
7. Copy old data
- `cp -RT elliebot-old/data/ elliebot/data/`
8. Copy creds.yml
- `cp elliebot-old/creds.yml elliebot/`
9. Move into elliebot directory and make the EllieBot executable
- `cd elliebot && chmod +x EllieBot`
10. Run the bot
- `./EllieBot`
🎉 Enjoy
##### Steps 3 - 9 as a single command
Don't forget to change X.XX.X to match step 2.
```sh
tar xf X.XX.X-linux-x64-build.tar && \
rm -rf elliebot-old 2>/dev/null && \
mv elliebot elliebot-old && \
mv elliebot-linux-x64 elliebot && \
rm elliebot-old/data/aliases.yml && \
rm -r elliebot-old/data/strings && \
cp -RT elliebot-old/data/ elliebot/data/ && \
cp elliebot-old/creds.yml elliebot/ && \
cd elliebot && chmod +x EllieBot
```

View file

@ -0,0 +1,81 @@
+++
title = "Windows Guide"
description = "How to set up EllieBot on Windows"
weight = 3
+++
{{% notice style="note" title="Notice on windows installer" %}}
~~There is an easier way in the works but this will take time to make, sorry about that. - Toastie~~
This way of installing and using Ellie is nearly ready so keep and eye out for that part of the guide. - Toastie
{{% /notice %}}
### Windows From Source
##### Prerequisites
**Install these before proceeding or your bot will not work!**
- [.net 8](https://dotnet.microsoft.com/en-us/download) - needed to compile and run the bot
- [git](https://git-scm.com/downloads) - needed to clone the repository (you can also download the zip manually and extract it, but this guide assumes you're using git)
- [Redis] (OPTIONAL)- to cache things needed by some features and persist through restarts
##### Installation Instructions
Open PowerShell (press windows button on your keyboard and type powershell, it should show up; alternatively, right click the start menu and select Windows PowerShell), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`)
1. `git clone https://toastielab.dev/EllieBotDevs/elliebot -b v5 --depth 1`
2. `cd EllieBot`
3. `dotnet publish -c Release -o output/ src/EllieBot/`
4. `cd output`
5. `cp creds_example.yml creds.yml`
6. Open `creds.yml` with your favorite text editor (Please don't use Notepad or WordPad. You can use Notepad++, VSCode, Atom, Sublime, or something similar)
7. [Enter your bot's token](../Features/creds-guide)
8. Run the bot `dotnet EllieBot.dll`
9. 🎉
##### Update Instructions
Open PowerShell as described above and run the following commands:
1. Stop the bot
- ⚠️ Make sure you don't have your database, credentials or any other EllieBot folder open in some application, this might prevent some of the steps from executing succesfully
2. Navigate to your bot's folder, example:
- `cd ~/Desktop/EllieBot`
3. Pull the new version, and make sure you're on the v5 branch
- *⚠️ the first 3 lines can be omitted if you're already on v5. If you're updating from v4, you must run them*
- `git remote set-branches origin '*'`
- `git fetch -v --depth=1`
- `git checkout v5`
- `git pull`
- ⚠️ If this fails, you may want to stash or remove your code changes if you don't know how to resolve merge conflicts
4. **Backup** old output in case your data is overwritten
- `cp -r -fo output/ output-old`
5. Build the bot again
- `dotnet publish -c Release -o output/ src/EllieBot/`
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
- ⚠ If you've modified said files, back them up instead
- `rm output-old/data/aliases.yml`
- `rm -r output-old/data/strings`
7. Copy old data
- `cp -Recurse .\output-old\data\ .\output\ -Force`
8. Copy creds.yml
- `cp output-old/creds.yml output/`
9. Run the bot
- `cd output`
- `dotnet EllieBot.dll`
🎉 Enjoy
#### Music prerequisites
In order to use music commands, you need ffmpeg and yt-dlp installed.
- [ffmpeg-32bit] | [ffmpeg-64bit] - Download the **appropriate version** for your system (32 bit if you're running a 32 bit OS, or 64 if you're running a 64bit OS). Unzip it, and move `ffmpeg.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `ffmpeg.exe` file to `EllieBot/output`.
- [youtube-dlp] - Click to download the `yt-dlp.exe` file, then move `yt-dlp.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `yt-dlp.exe` file to `EllieBot/system`.
[Notepad++]: https://notepad-plus-plus.org/
[.net]: https://dotnet.microsoft.com/download/dotnet/8.0
[Redis]: https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi
[Visual C++ 2010 (x86)]: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
[Visual C++ 2017 (x64)]: https://aka.ms/vs/15/release/vc_redist.x64.exe
[ffmpeg-32bit]: https://ellie.gcoms.xyz/dl/ffmpeg-32.zip
[ffmpeg-64bit]: https://ellie.gcoms.xyz/dl/ffmpeg-64.zip
[youtube-dlp]: https://github.com/yt-dlp/yt-dlp/releases

View file

@ -0,0 +1,16 @@
+++
archetype = "chapter"
title = "Ellie Marmalade"
description = "Under this category you can find guides about EllieBot's Marmalade system."
weight = 7
+++
Under this category you can find guides about EllieBot's Marmalade system.
{{% notice style="note" title="Advanced topic" %}}
This potion of the guides is more advanced than the rest of EllieBot.
This requires knowledge of how to use C#, but the guides will hopefully be helpful.
{{% /notice %}}
{{%children containerstyle="div" style="h2" description="true" %}}

View file

@ -0,0 +1,24 @@
+++
title = "Canary lifecycle."
description = "This documents the lifecycle of canaries"
weight = 3
+++
# Canary Lifecycle
*You can override several methods to hook into command handler's lifecycle.
These methods start with `Exec*`*
- `ExecOnMessageAsync` runs first right after any message was received
- `ExecInputTransformAsync` runs after ExecOnMessageAsync and allows you to transform the message content before the bot looks for the matching command
- `ExecPreCommandAsync` runs after a command was found but not executed, allowing you to potentially prevent command execution
- `ExecPostCommandAsync` runs if the command was successfully executed
- `ExecOnNoCommandAsync` runs instead of ExecPostCommandAsync if no command was found for a message
*Besides that, canaries have 2 methods with which you can initialize and cleanup your canary*
- `InitializeAsync` Runs when the marmalade which contains this canary is being loaded
- `DisposeAsync` Runs when the marmalade which contains this canary is being unloaded

View file

@ -0,0 +1,288 @@
+++
title = "Creating a marmalade."
description = "This will hopefully guide you on how to create a marmalade"
weight = 1
+++
## Practice
This section will guide you through how to create a simple custom marmalade. You can find the entirety of this code hosted [here](https://toastielab.dev/ellie/example_marmalade)
#### Prerequisite
- [.net8 sdk](https://dotnet.microsoft.com/en-us/download) installed
- Optional: use [vscode](https://code.visualstudio.com/download) to write code
#### There are currently two ways of creating a marmalade and you can view both of them using the tabs below.
{{<tabs title="Guides.">}}
{{% tab title="Using our template" %}}
#### Prerequisite
- [git](https://git-scm.com/downloads) installed
#### Guide
- Open your favorite terminal and navigate to a folder where you will keep your project .
- Install the ellie-marmalade template
- `git clone https://toastielab.dev/EllieBotDevs/ellie-marmalade`
- `cd ellie-marmalade`
- `dotnet new install .\`
- Create a new folder and move into it
- `mkdir example_marmalade `
- `cd example_marmalade`
- Make a new Ellie Marmalade project
- `dotnet new ellie-marmalade`
- This can be any name you want you just have to specify `-n <any name you want here>` after the first part of the command
- Here is an example `dotnet new ellie-marmalade -n my-cool-marmalade`
- This will create a marmalade project with the name my-cool-marmalade
Now follow the instructions below and you should be good to go.
{{% /tab %}}
{{% tab title="Building from scratch" %}}
#### Guide
{{%notice style="info"%}}
This requires writing a little bit of code but we will help you through it as much as we can.
{{%/notice%}}
#### Without any further issues we shall now begin
- Open your favorite terminal and navigate to a folder where you will keep your project .
- Create a new folder
- `mkdir example_marmalade`
- Create a new .net class library
- `dotnet new classlib`
- Open the current folder with your favorite editor/IDE. In this case we'll use VsCode
- `code .`
- Remove the `Class1.cs` file
- Replace the contents of the `.csproj` file with the following contents
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<!-- Reduces some boilerplate in your .cs files -->
<ImplicitUsings>enable</ImplicitUsings>
<!-- Use latest .net features -->
<LangVersion>preview</LangVersion>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<GenerateRequiresPreviewFeaturesAttribute>true</GenerateRequiresPreviewFeaturesAttribute>
<!-- tell .net that this library will be used as a plugin -->
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<!-- Base marmalade package. You MUST reference this in order to have a working marmalade -->
<!-- Also, this package comes from Toastielab, which requires you to have a NuGet.Config file next to your .csproj -->
<PackageReference Include="Ellie.Marmalade" Version="5.*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- Note: If you want to use EllieBot services etc... You will have to manually clone
the https://toastielab.dev/EllieBotDevs/elliebot repo locally and reference the EllieBot.csproj because there is no EllieBot package atm.
It is strongly recommended that you checkout a specific tag which matches your version of ellie,
as there could be breaking changes even between minor versions of EllieBot.
For example if you're running EllieBot 4.1.0 locally for which you want to create a marmalade for,
you should do "git checkout 4.1.0" in your EllieBot solution and then reference the EllieBot.csproj
-->
</ItemGroup>
<!-- Copy shortcut and full strings to output (if they exist) -->
<ItemGroup>
<None Update="res.yml;cmds.yml;strings/**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
```
- Create a `MyCanary.cs` file and add the following contents
```cs
using EllieBot.Marmalade;
using Discord;
public sealed class MyCanary : Canary
{
[cmd]
public async Task Hello(AnyContext ctx)
{
await ctx.Channel.SendMessageAsync($"Hello everyone!");
}
[cmd]
public async Task Hello(AnyContext ctx, IUser target)
{
await ctx.ConfirmLocalizedAsync("hello", target);
}
}
```
- Create `res.yml` and `cmds.yml` files with the following contents
`res.yml`
```yml
marmalade.description: "This is my marmalade's description"
hello: "Hello {0}, from res.yml!"
```
`cmds.yml`
```yml
hello:
desc: "This is a basic hello command"
args:
- ""
- "@Someone"
```
- Add `NuGet.Config` file which will let you use the base Ellie.Marmalade package. This file should always look like this and you shouldn't change it
```xml
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="toastielab.dev" value="https://toastielab.dev/api/packages/ellie/nuget/index.json" protocolVersion="3" />
</packageSources>
</configuration>
```
{{% /tab %}}
{{</tabs>}}
### Build it
- Build your Marmalade into a dll that Ellie can load. In your terminal, type:
- `dotnet publish -o bin/marmalades/example_marmalade /p:DebugType=embedded`
- Done. You can now try it out in action.
### Try it out
- Copy the `bin/marmalades/example_marmalade` folder into your EllieBot's `data/marmalades/` folder. (Ellie version 4.1.0+)
- Load it with `.maload example_marmalade`
- In the channel your bot can see, run the following commands to try it out
- `.hello` and
- `.hello @<someone>`
- Check its information with
- `.mainfo example_marmalade`
- Unload it
- `.maunload example_marmalade`
- 🎉 Congrats! You've just made your first marmalade! 🎉
## Theory
Marmalade system allows you to write independent marmalades (known as "modules", "cogs" or "plugins" in other software) which you can then load, unload and update at will without restarting the bot.
The marmalade base classes used for development are open source [here](https://toastielab.dev/EllieBotDevs/elliebot/src/branch/v5/src/Ellie.Marmalade) in case you need reference, as there is no generated documentation at the moment.
### Term list
#### Marmalade
- The project itself which compiles to a single `.dll` (and some optional auxiliary files), it can contain multiple [Canaries](#canary), [Services](#service), and [ParamParsers](#param-parser)
#### Canary
- A class which will be added as a single Module to EllieBot on load. It also acts as a [lifecycle handler](canary-lifecycle.md) and as a singleton service with the support for initialize and cleanup.
- It can contain a Canary (called SubCanary) but only 1 level of nesting is supported (you can only have a canary contain a subcanary, but a subcanary can't contain any other canaries)
- Canaries can have their own prefix
- For example if you set this to 'test' then a command called 'cmd' will have to be invoked by using `.test cmd` instead of `.cmd`
#### Canary Command
- Acts as a normal command
- Has context injected as a first argument which controls where the command can be executed
- `AnyContext` the command can be executed in both DMs and Servers
- `GuildContext` the command can only be executed in Servers
- `DmContext` the command can only be executed in DMs
- Support the usual features such as default values, leftover, params, etc.
- It also supports dependency injection via `[inject]` attribute. These dependencies must come after the context and before any input parameters
- Supports `ValueTask`, `Task`, `Task<T>` and `void` return types
#### Param Parser
- Allows custom parsing of command arguments into your own types.
- Overriding existing parsers (for example for IGuildUser, etc...) can cause issues.
#### Service
- Usually not needed.
- They are marked with a `[svc]` attribute, and offer a way to inject dependencies to different parts of your marmalade.
- Transient and Singleton lifetimes are supported.
### Localization
Response and command strings can be kept in one of three different places based on whether you plan to allow support for localization
option 1) `res.yml` and `cmds.yml`
If you don't plan on having your app localized, but you just *may* in the future, you should keep your strings in the `res.yml` and `cmds.yml` file the root folder of your project, and they will be automatically copied to the output whenever you build your marmalade.
##### Example project folder structure:
- uwu/
- uwu.csproj
- uwu.cs
- res.yml
- cmds.yml
##### Example output folder structure:
- marmalades/uwu/
- uwu.dll
- res.yml
- cmds.yml
option 2) `strings` folder
If you plan on having your app localized (or want to allow your consumers to easily add languages themselves), you should keep your response strings in the `strings/res/en-us.yml` and your command strings in `strings/cmds/en-us.yml` file. This will be your base file, and from there you can make support for additional languages, for example `strings/res/ru-ru.yml` and `strings/cmds/ru-ru.yml`
##### Example project folder structure:
- uwu/
- uwu.csproj
- uwu.cs
- strings/
- res/
- en-us.yml
- ru-ru.yml
- cmds/
- en-us.yml
- ru-ru.yml
##### Example output folder structure:
- marmalades/uwu/
- uwu.dll
- strings/
- res/
- en-us.yml
- ru-ru.yml
- cmds/
- en-us.yml
- ru-ru.yml
option 3) In the code
If you don't want any auxiliary files, and you don't want to bother making new .yml files to keep your strings in, you can specify the command strings directly in the `[cmd]` attribute itself, and use non-localized methods for message sending in your commands.
If you update your response strings .yml file(s) while the marmalade is loaded and running, running `.stringsreload` will reload the responses without the need to reload the marmalade or restart the bot.
#### Bot marmalade config file
- Marmalade config is kept in `marmalades/marmalade.yml` file
- At the moment this config only keeps track of which marmalades are currently loaded (they will also be always loaded at startup)
- If a marmalade is causing issues and you're unable to unload it, you can remove it from the `loaded:` list in this config file and restart the bot. It won't be loaded next time the bot is started up
#### Unloadability issues
To make sure your marmalade can be properly unloaded/reloaded you must:
- Make sure that none of your types and objects are referenced by the Bot or Bot's services after the DisposeAsync is called on your Canary instances.
- Make sure that all of your commands execute quickly and don't have any long running tasks, as they will hold a reference to a type from your assembly
- If you are still having issues, you can always run `.maunload` followed by a bot restart, or if you want to find what is causing the marmalade unloadability issues, you can check the [microsoft's assembly unloadability debugging guide](https://docs.microsoft.com/en-us/dotnet/standard/assembly/unloadability)

View file

@ -0,0 +1,36 @@
+++
title = "Getting started."
description = "This guide on getting started with the marmalade system"
weight = 2
+++
## Getting Started
### What is the Marmalade system?
- It is a dynamic module/plugin/cog system for EllieBot introduced in **EllieBot 4.1.0**
- Allows developers to add custom functionality to Ellie without modifying the original code
- Allows for those custom features to be updated during bot runtime (if properly written), without the need for bot restart.
- They are added to `data/marmalades` folder and are loaded, unloaded and handled through discord commands.
- `.maload` Loads the specified marmalade (see `.h .maload`)
- `.maunload` Unloads the specified marmalade (see `.h .maunload`)
- `.mainfo` Checks marmalades information (see `.h .mainfo`)
- `.malist` Lists the available marmalades (see `.h .malist`)
### How to make one?
Marmalades are written in [C#](https://docs.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/) programming language, so you will need at least low-intermediate knowledge of it in order to make a useful Marmalade.
Follow the [creating a marmalade guide](creating-a-marmalade.md)
### Where to get marmalades other people made?
*It is EXTREMELY, and I repeat **EXTREMELY** dangerous to run marmalades of strangers or people you don't FULLY trust.* ⚠
*It can not only lead to your bot being stolen, but it also puts your entire computer and personal files in jeopardy.*
**It is strongly recommended to run only the marmalades you yourself wrote, and only on a hosted VPS or dedicated server which ONLY hosts your bot, to minimize the potential damage caused by bad actors.**
No easy way at the moment, except asking in the `#dev-and-modding` chat in [#Ellie's Home server](https://discord.gg/etQdZxSyEH)

9
content/Ellie/_index.md Normal file
View file

@ -0,0 +1,9 @@
+++
archetype = "chapter"
title = "EllieBot"
weight = 1
+++
Welcome to the category containing guides about EllieBot.
{{%children containerstyle="div" style="h2" description="true" %}}

28
content/Ellie/commands.md Normal file
View file

@ -0,0 +1,28 @@
+++
title = "Commands Readme"
description = "Readme for Commands List"
weight = 3
+++
## Bot Owner Only
- *Bot Owner Only* commands refer to the commands only the **owner** of the bot can use.
- *Bot Owner Only* commands do **not** refer to the owner of the **server**, just the owner of the **bot**.
- *Owner of the bot* is a person who is **hosting** their own bot, and their **ID** is inside of **creds.yml** file.
## Music on the public Ellie
- In case you got Ellie in your server by the invitation from our **Toastielab** invite or **help (.h)**, music is disabled.
- Music is **disabled** due to large maintenance expenses
- If you want to have music module on your server, you will have to **host** the bot on your PC, or any of the external servers.
- How to **host** the bot, check the **guides** on the left side.
## EllieMoney
- EllieMoney is the **currency** of the public Ellie.
- EllieMoney can be `.pick`ed after Ellie drops a dollar randomly after `.gc` has been enabled on a channel
- You can give EllieMoney to other users, using the command `.give X @person`.
- You can only give money you **own**.
- If you want to have **unlimited** number of money, you will have to **host** the bot.
- Commands `.award X @person` and `.take X @person` can only be used by the *bot owner*.
- If you `.plant` the money, money will be avaliable for everyone to `.pick` it. In that case you will **lose** the money.

View file

@ -1,6 +1,8 @@
---
title: Ellie v5 Contribution guidelines
---
+++
title = "Ellie contribution guidelines"
description = "Steps on contributing to the Ellie bot project"
weight = 4
+++
## Hey there!
If you are on this page that means you either want to help us or you are just curious about our project our contribution steps for the Ellie bot project are below
@ -9,7 +11,7 @@ If you are on this page that means you either want to help us or you are just cu
```
1.Fork the repository
2.Clone your fork: git clone https://toastielab.dev/your-username/Ellie-bot.git
2.Clone your fork: git clone https://toastielab.dev/your-username/elliebot.git
3.Create your feature branch: git checkout -b my-new-feature
4.Commit your changes: git commit -am 'Add some feature'
5.Push to the branch: git push origin my-new-feature

43
content/_index.md Normal file
View file

@ -0,0 +1,43 @@
+++
archetype = "home"
title = "Welcome"
+++
This site hosts the guides for EllieBot
Refer to the table below for the links to our sites, Ellie's invite link and Discord server.
| Site Name | Link |
|--------------|:------------------:|
| Ellie Invite | [Invite link] |
| Ellie Commands | [Commands site link] |
| Ellie Site | [Site link] |
| Ellie Blog | [Blog link] |
| Ellie Discord | [Discord link] |
| Ellie's Code | [Code repo] |
| Ellie patchnotes | [Notes link] |
[Invite link]: https://discordapp.com/oauth2/authorize?client_id=608119997713350679&scope=bot&permissions=66186303/
[Commands site link]: https://commands.elliebot.net
[Site link]: https://elliebot.net
[Blog link]: https://blog.elliebot.net
[Discord link]: https://discord.gg/etQdZxSyEH
[Code repo]: https://toastielab.dev/EllieBotDevs/elliebot
[Notes link]: https://notes.elliebot.net

5
go.mod Normal file
View file

@ -0,0 +1,5 @@
module toastielab.dev/EllieBotDevs/EllieBot-docs
go 1.22.2
require github.com/McShelby/hugo-theme-relearn v0.0.0-20241209175307-bd1f3d343263 // indirect

4
go.sum Normal file
View file

@ -0,0 +1,4 @@
github.com/McShelby/hugo-theme-relearn v0.0.0-20240605212028-6f24d34f4442 h1:1RtA0zdTRxvcsvcYMp4h4bGlJ3hCKN1AD8YCeb7FGik=
github.com/McShelby/hugo-theme-relearn v0.0.0-20240605212028-6f24d34f4442/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
github.com/McShelby/hugo-theme-relearn v0.0.0-20241209175307-bd1f3d343263 h1:sa/39uZBgVjQABKBJY2KySKgCxn6uek3mV2e3vmPxkw=
github.com/McShelby/hugo-theme-relearn v0.0.0-20241209175307-bd1f3d343263/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=

32
hugo.toml Normal file
View file

@ -0,0 +1,32 @@
baseURL = 'https://docs.elliebot.net/'
languageCode = 'en-us'
title = 'The documentation site for EllieBot'
[markup]
[markup.tableOfContents]
# Some relatively important headers, like cc triggers, are on level 4;
# we want to have those in our table of contents, so we need to set this to 4.
endLevel = 10
[markup.goldmark]
[markup.goldmark.renderer]
# Enable HTML tags in Markdown
unsafe = true
[module]
[[module.imports]]
path = 'github.com/McShelby/hugo-theme-relearn'
[outputs]
home = [ "html" ]
[params]
themeVariant = [
{ identifier = "zen-auto", name = "Zen Light/Dark", auto = [ "zen-light", "zen-dark" ] },
{ identifier = "zen-light" },
{ identifier = "zen-dark" },
]
collapsibleMenu = true
disableRootBreadcrumb = true
disableInlineCopyToClipboard = true
editURL = 'https://toastielab.dev/EllieBotDevs/EllieBot-docs/src/branch/main/content/'

View file

@ -0,0 +1 @@
<link rel="stylesheet" href="{{ relURL "css/menu.css" }}">

View file

@ -0,0 +1,48 @@
<style>
a#R-logo {
color: #282828;
color: var(--MENU-SECTIONS-BG-color);
font-family: 'Work Sans', 'Helvetica', 'Tahoma', 'Geneva', 'Arial', sans-serif;
font-size: 1.875rem;
font-weight: 300;
margin-top: -.8125rem;
max-width: 60%;
text-transform: uppercase;
width: 14.125rem;
white-space: nowrap;
}
a#R-logo:hover {
color: #282828;
color: var(--MENU-SECTIONS-BG-color);
}
@media only all and (max-width: 59.999rem) {
a#R-logo {
font-size: 1.5625rem;
margin-top: -.1875rem;
}
}
@media all and (-ms-high-contrast:none) {
{
{
"/* IE11s understanding of positioning is weird at best */" | safeCSS
}
}
a#R-logo {
margin-top: -3.625rem;
}
}
img {
margin-right: 0.5rem;
margin-top: -0.25rem;
vertical-align: middle;
}
</style>
<a id="R-logo" href="{{ relURL "" }}">
<img src="{{ relURL "images/logo.png" }}" width=30px height=30px>EllieBot
</a>

View file

@ -0,0 +1,21 @@
<!-- make sure links are visible as such -->
<style>
p.menu-footer > a {
text-decoration: underline !important;
}
</style>
<p class="menu-footer">
© 2018 - 2024 EllieBotDevs
</p>
<p class="menu-footer">
Ellie code available on <a href="https://toastielab.dev/EllieBotDevs/elliebot"
title="Toastielab"><i class="fa-brands fa-git-alt"></i>Toastielab</a>
</p>
<!-- required to adhere to MIT license terms -->
<p class="menu-footer">
Built with <a href="https://github.com/McShelby/hugo-theme-relearn" title="love"><i class="fas fa-heart"></i></a>
by <a href="https://gohugo.io/">Hugo</a>
</p>

7932
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,19 +0,0 @@
{
"name": "ellie-docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.4.1",
"@astrojs/starlight": "^0.16.0",
"astro": "^4.2.1",
"sharp": "^0.32.5",
"typescript": "^5.3.3"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -1,7 +0,0 @@
import { defineCollection } from 'astro:content';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};

View file

@ -1,19 +0,0 @@
---
title: Holana commands
---
:::note
This page is scheduled for an update
:::
## Giveaway Commands
1. /start [channel-name] [Time] [winners] [Prize]
2. /reroll [giveawayid]
3. /end [prize name]
## Examples
1. /start #giveaway 5m 1 Testing
2. /end Testing
3. /reroll Testing

View file

@ -1,13 +0,0 @@
---
title: Welcome to Ellie Docs
template: splash
hero:
tagline: We hope you find what you are looking for!
image:
file: ../../assets/ellie.png
actions:
- text: v4 Guides
link: /v4/
icon: right-arrow
variant: primary
---

View file

@ -1,40 +0,0 @@
---
title: SupportChild commands
description: Here is the full command list for SupportChild
---
# Commands
| Command | Description |
|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `/add <user>` | Add users to the ticket. |
| `/addcategory <title> <category>` | Adds a category for users to open tickets in. The title is what will be used on buttons and in selection menus. |
| `/addmessage <identifier> <message>` | Adds a new message for the `say` command. The identifier is one word used in the say command and the message is what the bot prints. |
| `/addstaff <user>` | Registers a user as a staff member for ticket assignment. |
| `/assign (user)` | Assigns a ticket to a staff member, themself if no mention or id is provided. |
| `/blacklist <user>` | Blacklists users from opening tickets. |
| `/close` | Closes a ticket channel and posts a ticket transcript in the log channel. |
| `/createbuttonpanel` | Creates a panel of buttons for users to open tickets with, one for each saved category. |
| `/createselectionbox (message)` | Creates a selection menu for users to open tickets with. Message is the placeholder shown on the selection menu before anything is selected. |
| `/list (user)` | Lists a user's open and closed tickets. |
| `/listassigned (user)` | Lists all of a staff member's assigned tickets. |
| `/listopen` | Lists a number of the oldest still open tickets, default is 20. |
| `/listunassigned` | Lists all unassigned tickets. |
| `/move <category>` | Moves a ticket to a specific category by partial name. |
| `/new` | Opens a new ticket channel. |
| `/rassign (role)` | Randomly assigns a ticket to an active staff member. If a role is provided only staff member with that role are considered. |
| `/removecategory <category>` | Removes a category from the bot. |
| `/removemessage <identifier>` | Removes message from the database. |
| `/removestaff <user>` | Removes a user from staff. |
| `/say (identifier)` | Prints a message with information from staff. Use with no arguments to list ids. |
| `/setsummary <summary>` | Sets a summary for a ticket which can be viewed using the `summary` command. |
| `/status` | Shows a status message about the bot with info such as number of tickets and which version is running. |
| `/summary` | Shows some information about a ticket and its summary if set. |
| `/toggleactive (user)` | Toggles whether a staff member counts as active or not. |
| `/transcript (ticket id) ` | Generates a ticket transcript as an html file. |
| `/unassign` | Unassigns a ticket from the currently assigned staff member. |
| `/unblacklist <user>` | Un-blacklists users from opening tickets. |
| `/admin listinvalid` | Lists tickets which channels have been deleted, you can use the `/admin unsetticket` command to remove them from the ticket system. |
| `/admin reload` | Reloads the config. |
| `/admin setticket (channel)` | Makes the current channel a ticket. |
| `/admin unsetticket (ticket id)` | Removes a ticket without deleting the channel. |

View file

@ -1,8 +0,0 @@
---
title: v4 home
---
### Here is a list of the pages in this category
## [Ellie v4 expressions](/v4/expressions)
## [Ellie v4 placeholders](/v4/placeholders)
## [Ellie v4 permissions system](/v4/permissions-system)

View file

@ -1,9 +0,0 @@
---
title: About this category
---
:::note
This category is under construction.
:::

2
src/env.d.ts vendored
View file

@ -1,2 +0,0 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

6
static/css/menu.css Normal file
View file

@ -0,0 +1,6 @@
/* Increase the margin a little bit such that it doesn't look too crowded
* on the menu side bar.
*/
#R-topics {
margin-left: 0.5em;
}

View file

Before

Width:  |  Height:  |  Size: 273 KiB

After

Width:  |  Height:  |  Size: 273 KiB

View file

@ -1,3 +0,0 @@
{
"extends": "astro/tsconfigs/strict"
}