Junior Spellweaver
- Joined
- Jun 29, 2012
- Messages
- 143
- Reaction score
- 187
Hey there, so TheGeneral worked on basic discord logging for NGH in 2017, however, after reviewing the plugin code and the code for TemmieWebhook, I've began working on a new Plugin, which will allow all hotels to move their logging to discord, rather than from the database.
Features:
Logs to discord for all of the following:
- User Logins
- Bans
- Commands
- LTD Purchases
- Staff Catalogue Purchases
- Marketplace
- Photos
- Call for Help Reports
- Trading
- Wired Rewards
- Scripting detection.
- Wordfilter Triggering.
Configurable config.ini for the webhooks.
Configurable here and Everyone alerts per channel to alert your moderators of any issues.
Enable/Disable which logging you wish to use.
Again, I only take credit for when this is a completed plugin, the code itself is fully written from events that TheGeneral has written in Arcturus, and from using TemmieWebhook, All i'm doing is throwing it into a nice neat package for those who don't understand how plugins work.
ETA: Open Source git will be available on Sunday 14th for those who wish to test it, but the full version should be out by Wednesday 17th.
Here's some WIP Screenshots of Jarvis on NGH:
Code for that logging (Note, that for testing as of now, the discord url string for the webhook has been hidden, and is hardcoded.)
Features:
Logs to discord for all of the following:
- User Logins
- Bans
- Commands
- LTD Purchases
- Staff Catalogue Purchases
- Marketplace
- Photos
- Call for Help Reports
- Trading
- Wired Rewards
- Scripting detection.
- Wordfilter Triggering.
Configurable config.ini for the webhooks.
Configurable here and Everyone alerts per channel to alert your moderators of any issues.
Enable/Disable which logging you wish to use.
Again, I only take credit for when this is a completed plugin, the code itself is fully written from events that TheGeneral has written in Arcturus, and from using TemmieWebhook, All i'm doing is throwing it into a nice neat package for those who don't understand how plugins work.
ETA: Open Source git will be available on Sunday 14th for those who wish to test it, but the full version should be out by Wednesday 17th.
Here's some WIP Screenshots of Jarvis on NGH:
Code for that logging (Note, that for testing as of now, the discord url string for the webhook has been hidden, and is hardcoded.)
Code:
EventHandler
public static void onUserBuysPhoto(UserPurchasePictureEvent event) {
Habbo habbo = event.habbo;
Room room = event.habbo.getHabboInfo().getCurrentRoom();
DiscordEmbed de = DiscordEmbed.builder()
.title(habbo.getClient().getHabbo().getHabboInfo().getUsername() + " has taken a photo!")
.description("Click the image to see their beautiful photo!")
.url("https://nextgenhabbo.com/client/" + room.getId())
.footer(FooterEmbed.builder()
.text("Omie is always watching.")
.icon_url("http://vignette2.wikia.nocookie.net/undertale-brasil/images/4/4f/Temmie.jpg/revision/latest?cb=20160221005012&path-prefix=pt-br")
.build())
.thumbnail(ThumbnailEmbed.builder()
.url(event.url)
.height(320)
.build()) /
.fields(Arrays.asList(
FieldEmbed.builder()
.name("Room Information")
.value("Photo taken in: " + room.getName())
.build()
))
.build();
DiscordMessage dm = DiscordMessage.builder()
.username("Jarvis")
.content("")
.avatarUrl("https://pbs.twimg.com/profile_images/1115703751472365568/4BLviK1m_400x400.jpg")
.embeds(Arrays.asList(de))
.build();
photoLog.sendMessage(dm);
}
Attachments
You must be registered for see attachments list
Last edited: