onefuture
onefuture
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
for FREE
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
Blud is discord support
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
im sending better code
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
...
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
[Cmd, Aliases, RequireContext(ContextType.Guild), UserPerm(GuildPermission.ManageMessages)]
public async Task GEnd(ulong messageid)
{
await using var uow = db.GetDbContext();
var giveaway = uow.Giveaways.GiveawaysForGuild(ctx.Guild.Id).FirstOrDefault(x => x.MessageId == messageid);

if (giveaway == null)
{
await ctx.Channel.SendErrorAsync("No Giveaway with that message ID exists! Please try again!");
return;
}

if (giveaway.Ended == 1)
{
await ctx.Channel.SendErrorAsync($"This giveaway has already ended! Use `{await guildSettings.GetPrefix(ctx.Guild)}greroll {messageid}` to reroll!");
return;
}

var channel = await Context.Guild.GetTextChannelAsync(giveaway.ChannelId);
if (channel == null)
{
await ctx.Channel.SendErrorAsync("Giveaway channel not found!");
return;
}

await Service.GiveawayTimerAction(giveaway, channel.Guild, channel);
await ctx.Channel.SendConfirmAsync("Giveaway ended!");
}
[Cmd, Aliases, RequireContext(ContextType.Guild), UserPerm(GuildPermission.ManageMessages)]
public async Task GEnd(ulong messageid)
{
await using var uow = db.GetDbContext();
var giveaway = uow.Giveaways.GiveawaysForGuild(ctx.Guild.Id).FirstOrDefault(x => x.MessageId == messageid);

if (giveaway == null)
{
await ctx.Channel.SendErrorAsync("No Giveaway with that message ID exists! Please try again!");
return;
}

if (giveaway.Ended == 1)
{
await ctx.Channel.SendErrorAsync($"This giveaway has already ended! Use `{await guildSettings.GetPrefix(ctx.Guild)}greroll {messageid}` to reroll!");
return;
}

var channel = await Context.Guild.GetTextChannelAsync(giveaway.ChannelId);
if (channel == null)
{
await ctx.Channel.SendErrorAsync("Giveaway channel not found!");
return;
}

await Service.GiveawayTimerAction(giveaway, channel.Guild, channel);
await ctx.Channel.SendConfirmAsync("Giveaway ended!");
}
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
[Cmd, Aliases, RequireContext(ContextType.Guild), UserPerm(GuildPermission.ManageMessages)]
public async Task GEnd(ulong messageid)
{
await using var uow = db.GetDbContext();
var gway = uow.Giveaways.GiveawaysForGuild(ctx.Guild.Id).FirstOrDefault(x => x.MessageId == messageid);

if (gway == null)
{
await ctx.Channel.SendErrorAsync("No Giveaway with that message ID exists! Please try again!").ConfigureAwait(false);
return;
}

if (gway.Ended == 1)
{
await ctx.Channel.SendErrorAsync(
$"This giveaway has already ended! Please use `{await guildSettings.GetPrefix(ctx.Guild)}greroll {messageid}` to reroll!").ConfigureAwait(false);
return;
}

var channel = await Context.Guild.GetTextChannelAsync(gway.ChannelId);
if (channel == null)
{
await ctx.Channel.SendErrorAsync("Giveaway channel not found!").ConfigureAwait(false);
return;
}

await Service.GiveawayTimerAction(gway, channel.Guild, channel).ConfigureAwait(false);
await ctx.Channel.SendConfirmAsync("Giveaway ended!").ConfigureAwait(false);
}
[Cmd, Aliases, RequireContext(ContextType.Guild), UserPerm(GuildPermission.ManageMessages)]
public async Task GEnd(ulong messageid)
{
await using var uow = db.GetDbContext();
var gway = uow.Giveaways.GiveawaysForGuild(ctx.Guild.Id).FirstOrDefault(x => x.MessageId == messageid);

if (gway == null)
{
await ctx.Channel.SendErrorAsync("No Giveaway with that message ID exists! Please try again!").ConfigureAwait(false);
return;
}

if (gway.Ended == 1)
{
await ctx.Channel.SendErrorAsync(
$"This giveaway has already ended! Please use `{await guildSettings.GetPrefix(ctx.Guild)}greroll {messageid}` to reroll!").ConfigureAwait(false);
return;
}

var channel = await Context.Guild.GetTextChannelAsync(gway.ChannelId);
if (channel == null)
{
await ctx.Channel.SendErrorAsync("Giveaway channel not found!").ConfigureAwait(false);
return;
}

await Service.GiveawayTimerAction(gway, channel.Guild, channel).ConfigureAwait(false);
await ctx.Channel.SendConfirmAsync("Giveaway ended!").ConfigureAwait(false);
}
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
ask chat gpt to optimize it
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
almost blinded myself looking at that
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
heres a better alternative
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
im guessing you are using discord.net right?
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
213 replies
CC#
Created by SylveonDeko on 8/21/2023 in #help
❔ Im gonna lose my fucking mind over this
@new FuckPremiumBots() have you considered this
213 replies