Skip to content

Commit

Permalink
Add disable title to slash commands
Browse files Browse the repository at this point in the history
  • Loading branch information
bman46 committed Nov 28, 2022
1 parent 1f05549 commit 0ce9191
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Instagram Reels Bot/Modules/SlashCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public SlashCommands(CommandHandler handler, Subscriptions subs, IConfiguration
}

//Create embed builder:
IGEmbedBuilder embed = new IGEmbedBuilder(response, Context.User.Username, HasSpoilers);
IGEmbedBuilder embed = (!string.IsNullOrEmpty(_config["DisableTitle"]) && _config["DisableTitle"].ToLower() == "true") ? (new IGEmbedBuilder(response)) : (new IGEmbedBuilder(response, Context.User.Username));

//Create component builder:
IGComponentBuilder component = new IGComponentBuilder(response, Context.User.Id, _config);
//Create component builder:
IGComponentBuilder component = new IGComponentBuilder(response, Context.User.Id, _config);

if (response.isVideo)
{
Expand Down Expand Up @@ -150,8 +150,8 @@ public async Task Profile([Summary("username", "The username of the Instagram ac
return;
}

IGEmbedBuilder embed = new IGEmbedBuilder(response, Context.User.Username);
IGComponentBuilder component = new IGComponentBuilder(response, Context.User.Id, _config);
IGEmbedBuilder embed = (!string.IsNullOrEmpty(_config["DisableTitle"]) && _config["DisableTitle"].ToLower() == "true") ? (new IGEmbedBuilder(response)) : (new IGEmbedBuilder(response, Context.User.Username));
IGComponentBuilder component = new IGComponentBuilder(response, Context.User.Id, _config);

await FollowupAsync(embed: embed.AutoSelector(), allowedMentions: AllowedMentions.None, components: component.AutoSelector());
}
Expand Down

0 comments on commit 0ce9191

Please sign in to comment.