Skip to content

Commit

Permalink
bot -> app, translate command & bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pukimaa committed Apr 18, 2024
1 parent b49b563 commit 00839ab
Show file tree
Hide file tree
Showing 53 changed files with 479 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .changeset/brown-pens-play.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"tako": patch
---

Remove `/sync` (bot owner command) from user-installable commands.
Remove `/sync` (app owner command) from user-installable commands.
2 changes: 1 addition & 1 deletion .changeset/calm-apricots-look.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"tako": patch
---

Added error handling that logs the error in `bot.log` instead of exiting the code.
Added error handling that logs the error in `app.log` instead of exiting the code.
6 changes: 5 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"changesets": [
"brown-pens-play",
"calm-apricots-look",
"five-scissors-whisper",
"itchy-goats-kick",
"quiet-dogs-do",
"slimy-pots-impress"
"slimy-pots-impress",
"smart-dancers-eat",
"strong-seahorses-love",
"two-socks-ring"
]
}
6 changes: 6 additions & 0 deletions .changeset/smart-dancers-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tako-docs": patch
"tako": patch
---

Add `/translate` command
5 changes: 5 additions & 0 deletions .changeset/strong-seahorses-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tako": patch
---

Add `detect` function to detect the language of a text. This will be used for the upcoming automatic translation feature.
6 changes: 6 additions & 0 deletions .changeset/two-socks-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tako-docs": patch
"tako": patch
---

Rename bot ➜ app
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apps/tako/lid.176.bin filter=lfs diff=lfs merge=lfs -text
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/fasttext/fastText"]
path = packages/fasttext/fastText
url = https://github.com/facebookresearch/fastText.git
11 changes: 8 additions & 3 deletions apps/tako/.vscode/settings.json → .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.localesPaths": [
"apps/tako/src/locales"
],
"i18n-ally.keystyle": "nested",
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnType": false, // required
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"vs-code-prettier-eslint.prettierLast": false
}
"vs-code-prettier-eslint.prettierLast": false,
"[mdx]": {
"editor.defaultFormatter": "unifiedjs.vscode-mdx"
}
}
File renamed without changes.
7 changes: 7 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# tako-docs

## 0.0.3-alpha.2

### Patch Changes

- Add `/translate` command
- Rename bot ➜ app

## 0.0.3-alpha.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default defineConfig({
name: 'Tako User Docs',
icon: './public/favicon.png',
short_name: 'Tako Docs',
description: 'Documentation for the Tako Discord bot - Everything you need, neatly packaged in a Tako.',
description: 'Documentation for the Tako Discord app - Everything you need, neatly packaged in a Tako.',
start_url: '/',
theme_color: '#299BA3',
background_color: '#14171b',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tako-docs",
"type": "module",
"version": "0.0.3-alpha.1",
"version": "0.0.3-alpha.2",
"license": "MIT",
"private": "true",
"scripts": {
Expand Down
Binary file added apps/docs/src/assets/utility/translate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions apps/docs/src/content/docs/de/commands/info/user.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Nutzer Infos
description: A reference page for the "/info user" command inside the Tako Discord bot.
description: A reference page for the "/info user" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand All @@ -10,9 +10,7 @@ Mit `/info user`, kriegst du Informationen von einem Nutzer auf Discord. Das ist
## Benutzung

<Tabs>
<TabItem label="Slash Befehle">
`/info nutzer [nutzer]`
</TabItem>
<TabItem label="Slash Befehle">`/info nutzer [nutzer]`</TabItem>
<TabItem label="Kontext Menü">
[*Nutzer Kontext Menü*](../../../reference/context-menus/#user-context-menu) > *Apps* > *Nutzer-Info*
</TabItem>
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/src/content/docs/de/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Welcome
description: Get started using Tako like a pro.
description: Lege los mit der Verwendung von Tako wie ein Profi!
template: splash
hero:
title: |
Expand All @@ -13,7 +13,7 @@ hero:
>
Tako
</span>
tagline: Alles, was du brauchst, um mit dem Tako Discord-Bot loszulegen.
tagline: Alles, was du brauchst, um mit der Tako Discord-App loszulegen.
actions:
- text: Lege Los
link: /de/guides/getting-started/
Expand Down
14 changes: 7 additions & 7 deletions apps/docs/src/content/docs/en/commands/fun/ip.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: IP
description: A reference page for the "/ip" command inside the Tako Discord bot.
description: A reference page for the "/ip" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand All @@ -11,18 +11,18 @@ With `/ip`, you can show (a fake) IP Adress of an user, including yourself.
## Usage

<Tabs>
<TabItem label="Context Menu">
`/ip [user]`
</TabItem>
<TabItem label="Context Menu">`/ip [user]`</TabItem>
</Tabs>

## Options

<Tabs>
<TabItem label="User">
<TabItem label="User">
<Badge text="Optional" />
The user you want to show the IP Adress of. This is yourself if not specified. The default is yourself.
</TabItem>
The user you want to show the IP Adress of. This is yourself if not specified. The default is yourself.
</TabItem>
</Tabs>

## Output

![Screenshot of the IP Command](../../../../../assets/fun/ip.png)
3 changes: 2 additions & 1 deletion apps/docs/src/content/docs/en/commands/fun/uwuify.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: uwuify
description: A reference page for the "/uwuify" command inside the Tako Discord bot.
description: A reference page for the "/uwuify" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand Down Expand Up @@ -61,4 +61,5 @@ All options excluding the `message` option, is a percentage-based number that ca
**Example (100%)**:
This is a text with speciaw excwamations!!1! Isn't this coow?!?!
</TabItem>

</Tabs>
2 changes: 1 addition & 1 deletion apps/docs/src/content/docs/en/commands/info/badge.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Badge Info
description: A reference page for the "/info badge" command inside the Tako Discord bot.
description: A reference page for the "/info badge" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/src/content/docs/en/commands/info/ping.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Ping
description: A reference page for the "/ping" command inside the Tako Discord bot.
description: A reference page for the "/ping" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';

With `/ping`, you can get the ping of the bot, which can be useful to check whether the bot is online and responsive.
With `/ping`, you can get the ping of the app, which can be useful to check whether the app is online and responsive.

## Usage

Expand All @@ -18,4 +18,4 @@ With `/ping`, you can get the ping of the bot, which can be useful to check whet
## Output

![Screenshot of the Ping Command](../../../../../assets/info/ping.png)
This command will show you a simple embed with the response time of the bot, nothing more, nothing less. The color of the embed will change depending on the response time, between green (0-200ms), yellow (200-400ms), and red (400ms+).
This command will show you a simple embed with the response time of the app, nothing more, nothing less. The color of the embed will change depending on the response time, between green (0-200ms), yellow (200-400ms), and red (400ms+).
18 changes: 10 additions & 8 deletions apps/docs/src/content/docs/en/commands/info/urban.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Urban Dictionary
description: A reference page for the "/urban-dictionary" command inside the Tako Discord bot.
description: A reference page for the "/urban-dictionary" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand All @@ -17,34 +17,36 @@ With `/urban-dictionary`, you can serach for the definition of a word using data
</Tabs>

## Options

<Tabs>
<TabItem label="Term">
The term to search for.

**Example**:
koonce
koonce
</TabItem>
<TabItem label="Strict">
<TabItem label="Strict">
<Badge text="Default: false" />
Whether to use strict mode or not.

**Example (`true`)**:
Returns only "bigger" and not "biggering", "biggered".
Returns only "bigger" and not "biggering", "biggered".
</TabItem>
<TabItem label="Match Case">
<TabItem label="Match Case">
<Badge text="Default: false" />
Whether the results need to match the casing of the term.

**Example (`true`)**:
Just returns results for "hEllO" and not "hello".
Just returns results for "hEllO" and not "hello".
</TabItem>
<TabItem label="Ephemeral">
<TabItem label="Ephemeral">
<Badge text="Default: false" />
Whether to send the response as an ephemeral message (only visible to you).

**Example (`true`)**:
![A screenshot showing the ephemeral response of the command](../../../../../assets/info/urban-ephemeral.png)
![A screenshot showing the ephemeral response of the command](../../../../../assets/info/urban-ephemeral.png)
</TabItem>

</Tabs>

## Output
Expand Down
6 changes: 2 additions & 4 deletions apps/docs/src/content/docs/en/commands/info/user.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: User Info
description: A reference page for the "/info user" command inside the Tako Discord bot.
description: A reference page for the "/info user" command inside the Tako Discord app.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand All @@ -10,9 +10,7 @@ With `/info user`, you can get information about a user on Discord. This is usef
## Usage

<Tabs>
<TabItem label="Slash Commands">
`/info user [user]`
</TabItem>
<TabItem label="Slash Commands">`/info user [user]`</TabItem>
<TabItem label="Context Menu">
[*User Context Menu*](../../../reference/context-menus/#user-context-menu) > *Apps* > *User Info*
</TabItem>
Expand Down
28 changes: 16 additions & 12 deletions apps/docs/src/content/docs/en/commands/utility/auto-react.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Automatic Reactions
description: |
A reference page for the '/auto-react' subcommand group inside the Tako Discord bot.
With '/auto-react', you can set up emojis that will be automatically be used to react on every new message sent in a channel. This can be useful for example to create a voting system or increase activity in read-only channels.
A reference page for the '/auto-react' subcommand group inside the Tako Discord app.
With '/auto-react', you can set up emojis that will be automatically be used to react on every new message sent in a channel. This can be useful for example to create a voting system or increase activity in read-only channels.
---

import { Tabs, TabItem } from '@astrojs/starlight/components';
Expand All @@ -11,6 +11,7 @@ import Badge from '@astrojs/starlight/components/Badge.astro';
With `/auto-react`, you can set up emojis that will be automatically be used to react on every new message sent in a channel. This can be useful for example to create a voting system or increase activity in read-only channels.

## Usage/Subcommands

<Tabs>
<TabItem label="Add">
`/auto-react add <emoji> [channel]`
Expand All @@ -24,25 +25,28 @@ With `/auto-react`, you can set up emojis that will be automatically be used to
</Tabs>

## Permissions

In order to use the `/auto-react` subcommands, you need to be able to `Add Reactions` & `Manage Expressions/Emojis`.
:::tip
You can change the permisions via `Server Settings > Integrations > Tako` in your Discord server.
:::

## Options

<Tabs>
<TabItem label="Emoji">
The emoji to add or remove from the auto-reactions list.
This can either be a custom emoji or a unicode/default emoji. You can just type in the emoji like you would in the regular chatbox.
</TabItem>
<TabItem label="Channel">
<Badge text="Default: The channel you execute the command from" />
The channel to add, remove or list auto-reactions.
</TabItem>
<TabItem label="Emoji">
The emoji to add or remove from the auto-reactions list. This can either be a custom emoji or a unicode/default
emoji. You can just type in the emoji like you would in the regular chatbox.
</TabItem>
<TabItem label="Channel">
<Badge text="Default: The channel you execute the command from" />
The channel to add, remove or list auto-reactions.
</TabItem>
</Tabs>

## How it works

Once you have any emojis added to the auto-reactions list of a channel, those emojis will be automatically added as reactions to every new message sent in that channel.

Please note that if you provide an emoji that can't be accessed by the bot, it will be removed from the auto-reactions list automatically.
That means that if you use a custom emoji, the bot needs to have access to the server where the emoji is from.
Please note that if you provide an emoji that can't be accessed by the app, it will be removed from the auto-reactions list automatically.
That means that if you use a custom emoji, the app needs to have access to the server where the emoji is from.
Loading

0 comments on commit 00839ab

Please sign in to comment.