mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 04:43:40 +01:00
feat: CfPreferredRole notification WIP, needs configuration
This commit is contained in:
parent
9dbb47624a
commit
a91eeda956
5 changed files with 104 additions and 1 deletions
|
|
@ -122,6 +122,32 @@ namespace Dalamud.DiscordBot {
|
|||
await channel.SendMessageAsync(embed: embedBuilder.Build());
|
||||
}
|
||||
|
||||
public async Task ProcessCfPreferredRoleChange(string rouletteName, string prevRoleName, string currentRoleName)
|
||||
{
|
||||
if (this.config.CfPreferredRoleChannel == null)
|
||||
return;
|
||||
|
||||
var channel = await GetChannel(this.config.CfPreferredRoleChannel);
|
||||
|
||||
var world = string.Empty;
|
||||
|
||||
if (this.dalamud.ClientState.Actors.Length > 0)
|
||||
world = this.dalamud.ClientState.LocalPlayer.CurrentWorld.Name;
|
||||
|
||||
var embedBuilder = new EmbedBuilder
|
||||
{
|
||||
Title = "Roulette bonus changed: " + rouletteName,
|
||||
Description = $"From {prevRoleName} to {currentRoleName}",
|
||||
Footer = new EmbedFooterBuilder {
|
||||
Text = $"On {world} | XIVLauncher"
|
||||
},
|
||||
Timestamp = DateTimeOffset.Now,
|
||||
Color = new Color(0xf5aa42),
|
||||
};
|
||||
|
||||
await channel.SendMessageAsync(embed: embedBuilder.Build());
|
||||
}
|
||||
|
||||
public async Task ProcessRetainerSale(int itemId, int amount, bool isHq) {
|
||||
if (this.config.RetainerNotificationChannel == null)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ namespace Dalamud.DiscordBot
|
|||
public List<ChatTypeConfiguration> ChatTypeConfigurations { get; set; }
|
||||
|
||||
public ChannelConfiguration CfNotificationChannel { get; set; }
|
||||
public ChannelConfiguration CfPreferredRoleChannel { get; set; }
|
||||
public ChannelConfiguration FateNotificationChannel { get; set; }
|
||||
public ChannelConfiguration RetainerNotificationChannel { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue