NOTE: I AM NO LONGER ACTIVELY DEVELOPING, MAINTAINING, OR SUPPORTING THOSE WHO USE THIS PLUGIN.
- Required Dependencies:
DiscordReport is a plugin that uses the Discord API to allow players to use an in-game command to report a player. It then sends information regarding the report to a given Discord Server.
If anyone could provide more accurate translations of the lang files, message me please!
- Send reports from in-game to a discord server, with steam profiles from the reporter and the reported users.
- Logs reports
- Lang support for German, Spanish, French, and Russian.
- Permissions for using the report command
- Ability to block and unblock a user from using the report command
/report <user> <reason>
/dr block <user>
- The user can be part of a username or a full username, but full username is best. After using this command, it will send a message to your text channel with whatever you gave in your lang file.
/dr unblock <user>
- Blocks a user from using the /dr report command. Useful if someone is abusing the command.
- Alternatively, you can grant a user the permission for being blocked, found below.
/dr isblocked <user>
- The opposite of block.
/dr isimmune <user>
- Checks if a user is blocked from using /report <user> <reason>
/dr ti <user>
- Checks if a user is immune from command cooldowns
- Toggle a users immunity to command cooldowns through a command, rather than through a permission.
"Cooldown between each report (seconds)": 60,
"Custom chat Prefix: ": "<color=silver>[</color><color=orange>DiscordReport</color><color=silver>]</color> ",
"Log reports? (true / false)": true,
"Send steam profile link with reports? (true / false)": true
Required:Code (Text):discordreport.use - allows you to use the basic /report command
discordreport.admin - allows you to use /dr block, /dr unblock, and /dr ti <user>
discordreport.isblocked - blocks the user from using the /report command. This is grantable by an in-game command.
discordreport.isimmune - sets whether they're immune to command cooldowns
I've made a very simply Discord bot if you wish to use that. The GitHub for the bot can be found here: GitHub - Bobakanoosh/RustNotifierBot: A bot used for Rust's Oxide mod, integrated with Discord API.
- Any Discord bot
- Please note that it's necessary to either host the bot either on your computer or on a server. It takes up hardly any CPU and RAM (maybe 30mb), so anything cheap will do. I'm hosting my own bot on a VM and am allowing anyone to use it, just PM me for the token.
This contains the .dll's for Discord.Net's library, and the execution file.
If you already have a bot setup, follow steps 1, 2, 10, 11, and 15.
- Put Discord.cs and DiscordReport.cs in your server plugin folder.
- Run the server, and then close it. This should generate the DiscordReport.json config file.
- Next we'll move on to setting up the bot account. If you don't have a discord account, sign up here, and then login-in.
- Next, go to here. This is Discord's developer page. Under the 'My apps' tab, click 'New App'.
- Fill in App name, which is basically your bots name. I recommend RustNotifierBot, but any name will work. You can also fill in an app description and insert a bot picture, but both aren't necessary. Here's how I filled it out:Once done, hit 'Create App'
- Then, click "Create a Bot User". It will ask if you're sure, say yes.
- On the page it brings you to, you'll see a client ID. Insert it into this link:. Replace <CLIENT_ID> with yours, without the <>'s.Code (Text):https://discordapp.com/oauth2/authorize?client_id=<CLIENT_ID>&scope=bot
- After going to that page, it will ask if you want to authorize your your both for a server. You must have 'Manage Servers' permission on the server to have the bot join the server.
- After having it join the server, make sure it shows up in your server user list. Notice that it's currently offline, lets turn it online!
- Going back to the Discord.json, open it with a text-editor like Notepad++. On your Discord Bot's page, you'll see something that says Token: click to reveal. After revealing, you'll get a long string of words. Put this into the Discord.json's "BotToken" area.
- To get the "ChannelID", you'll need to enable a setting in discord. In the bottom left, click the settings button. It's a cog. Go to Appearance, and check 'Developer Mode'. This allows you to get User ID's and Channel ID's. Then, right click the text channel (i.e #rust_reports) that you want the bot to send messages to. Click 'Copy ID' and put it into the "ChannelID" field.
- You're nearly done! If you chose to download my discord bot, run the RustNotifierBot.exe Application. This will launch a console that will prompt you to enter the Bot token (the long string you used earlier), and the name of the bot. If you mess one of these up, they'll be customizable in the /data/configuration.json file. This is located wherever you ran the program.
- Every file that's in the downloaded file is necessary. Do not delete anything.
- After all of this, your bot should be online, like any other player! Just to make sure, go ahead and type +bot info. If it replies with information to the bot, then you're good!
- The in-game commands listed above should now work.
If you wish to see anything new, let me know!
- [Done] Command for blocking and unblocking a user from using the report command
- [Done] Configurable cooldown on commands.
- [Done] Add immunity to cooldown on commands
- [Done]Customizable prefix for each chat message.
I'm hosting my own on a VM on a box I have. *Note: I'm no longer hosting the bot for people*