Skip to content

Commit 2088ab1

Browse files
drop music-player functionality, upstream breaks too often
1 parent 905ee49 commit 2088ab1

File tree

11 files changed

+34
-543
lines changed

11 files changed

+34
-543
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:latest
22

3-
RUN apt-get update && apt-get install -y ffmpeg --no-install-recommends
3+
RUN apt-get update --no-install-recommends
44

55
WORKDIR /usr/app
66

README.md

Lines changed: 25 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
> [!NOTE]
2-
> Please note that this bot is not actively maintained. Some services, especially those related to embed fixes, may occasionally go down.
2+
> Please note that this bot is not actively maintained.
33
4-
> [!IMPORTANT]
5-
> The YouTube / Spotify / SoundCloud resolver `play-dl` seems to keep breaking(?) and plays the wrong songs. You can install `youtube-ext`, `@distube/ytdl-core`, `yt-stream` or `ytdl-core` instead. To do this, remove `play-dl` by running `npm remove play-dl` and then install another resolver with `npm install <resolver-of-choice>` in the `data/` directory. Make sure that you have installed NodeJS for this to work. Then recreate the Docker Compose project with `docker compose up --build --force-recreate --no-cache`.
4+
# Discord Embed Buddy
65

7-
# Discord-SM
6+
This is a Node.js-based Discord bot that intercepts messages with potentially faulty social media embeds and provides proxy links for the content in response.
87

9-
This is a Node.js-based Discord bot that plays music from various sources including Spotify, YouTube, and SoundCloud. It also includes features for managing the music queue, supports multiple commands, and handles social media link embeds.
8+
## URL Replacements
109

11-
## Features
10+
Here's an overview of the URL replacements:
1211

13-
- **Music Playback**: Add, skip, stop, and manage songs in the queue from various sources.
14-
- **Social Media Link Embeds**: Automatically replaces original embeds for social media links with custom embed fixes.
15-
- **Multilanguage Support**: The bot can operate in multiple languages. Currently available languages are English and German.
12+
| Original URL | Replacement URL |
13+
|--------------------|------------------|
14+
| `twitter.com` | `fxtwitter.com` |
15+
| `x.com` | `fixupx.com` |
16+
| `tiktok.com` | `d.tnktok.com` |
17+
| `vm.tiktok.com` | `d.tnktok.com` |
18+
| `reddit.com` | `rxddit.com` |
19+
| `old.reddit.com` | `old.rxddit.com` |
20+
| `instagram.com` | `ddinstagram.com`|
1621

1722
## Docker Setup
1823

@@ -26,6 +31,17 @@ Ensure you have Docker installed on your system.
2631

2732
1. **Clone this repository**.
2833

34+
1. **Configure your `.env` file**.
35+
36+
Before running the Docker container, make sure you set up the necessary environment variables. Create a `.env` file in the `data` directory with the following content:
37+
38+
```sh
39+
DISCORD_TOKEN=<discord-token>
40+
CLIENT_ID=<bot-client-id>
41+
```
42+
43+
Replace `<discord-token>` and `<bot-client-id>` with your actual Discord bot token and client ID.
44+
2945
2. **Navigate to the project directory** where the Dockerfile and `compose.yml` are located.
3046

3147
3. **Build and start the Docker container** using Docker Compose:
@@ -37,44 +53,6 @@ Ensure you have Docker installed on your system.
3753
- Build the Docker image as defined in the `Dockerfile`.
3854
- Start the container with the configuration specified in `compose.yml`.
3955

40-
### Configuration
41-
42-
Before running the Docker container, make sure you set up the necessary environment variables. Create a `.env` file in the `data` directory with the following content:
43-
44-
```sh
45-
DISCORD_TOKEN=<discord-token>
46-
CLIENT_ID=<bot-client-id>
47-
```
48-
49-
Replace `<discord-token>` and `<bot-client-id>` with your actual Discord bot token and client ID.
50-
51-
## Commands
52-
53-
Here's an overview of the available commands:
54-
55-
### Slash Commands
56-
57-
| Command | Description | Options |
58-
|--------------|-----------------------------------------------------------------------------|---------------------------------------|
59-
| `/play` | Add a song from Spotify, YouTube, SoundCloud, or similar to the queue. | `song`: Song title or link (required) |
60-
| `/stop` | Clear the queue and kick the bot from the channel. | |
61-
| `/skip` | Skip the current song in the queue. | |
62-
| `/listqueue` | Display a list of the current queue. | |
63-
| `/wrongsong` | Remove the last song requested by you from the queue. | |
64-
| `/song` | Display the current song. | |
65-
| `/language` | Set the bot's language for the entire server. | `lang`: Language choice (required) |
66-
67-
### Text Commands
68-
69-
| Command | Description |
70-
|----------------|--------------------------------------------------|
71-
| `!forcedelete` | Deletes all guild-specific commands for the bot. |
72-
| `!forceupdate` | Updates all guild-specific commands for the bot. |
73-
74-
## Localization
75-
76-
The bot supports multiple languages. Currently available languages are English and German. You can change the bot's language using the `/language` command.
77-
7856
## License
7957

8058
This project is licensed under the MIT License.

data/config/guild_data.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

data/config/messages.json

Lines changed: 0 additions & 71 deletions
This file was deleted.

data/package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
{
2-
"name": "discord-sm",
3-
"version": "1.0.0",
4-
"description": "Discord bot that fixes social media embeds and enables music playback",
2+
"name": "embeds-buddy",
3+
"version": "1.1.0",
4+
"description": "Discord bot that fixes social media embeds",
55
"main": "src/index.js",
66
"scripts": {
77
"start": "node --no-deprecation --env-file=.env src/index.js"
88
},
99
"author": "philippgitpush",
1010
"license": "MIT",
1111
"dependencies": {
12-
"@discordjs/opus": "^0.9.0",
13-
"discord-player": "^6.6.8",
14-
"discord.js": "^14.14.1",
15-
"fs": "^0.0.1-security",
16-
"play-dl": "^1.9.7"
12+
"discord.js": "^14.14.1"
1713
}
1814
}

data/src/commandRefresh.js

Lines changed: 0 additions & 153 deletions
This file was deleted.

data/src/discordClient.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ const Client = new Discord.Client({ intents: [
44
Discord.GatewayIntentBits.Guilds,
55
Discord.GatewayIntentBits.GuildMessages,
66
Discord.GatewayIntentBits.MessageContent,
7-
Discord.GatewayIntentBits.GuildMembers ,
8-
Discord.GatewayIntentBits.GuildVoiceStates
7+
Discord.GatewayIntentBits.GuildMembers
98
] });
109

1110
const token = process.env.DISCORD_TOKEN;

data/src/embedFix.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const { getMessage, getGuildLang } = require('./locales');
21
const Client = require('./discordClient');
32
const Discord = require('discord.js');
43

@@ -8,7 +7,7 @@ Client.on(Discord.Events.MessageCreate, message => {
87
if (hasMatchingDomain(message.content)) {
98
const url = replaceDomains(extractURL(message.content));
109
message.suppressEmbeds(true);
11-
message.reply(getMessage('user.embedfix.output', getGuildLang(message.guild.id), { url }));
10+
message.reply(url);
1211
}
1312
});
1413

data/src/index.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
require('./discordClient'); // Discord Bot Client
2-
require('./locales'); // Localization / translation
3-
require('./embedFix'); // Soecial media link embed fixes
4-
require('./musicPlayer'); // Music player
5-
require('./commandRefresh'); // Discord commands config
1+
require('./discordClient');
2+
require('./embedFix');

0 commit comments

Comments
 (0)