P A T R I C K
P A T R I C K
CC#
Created by P A T R I C K on 2/26/2025 in #help
Hot reload doesn't work correctly on .NET9
the modifications aren't done and i gotta "dotnet watch run" to get them
7 replies
CC#
Created by P A T R I C K on 2/26/2025 in #help
Hot reload doesn't work correctly on .NET9
actually it does want to run but what i meant was that it doesn't reload well
7 replies
CC#
Created by P A T R I C K on 2/26/2025 in #help
Hot reload doesn't work correctly on .NET9
dotnet 9
7 replies
CC#
Created by P A T R I C K on 2/26/2025 in #help
Hot reload doesn't work correctly on .NET9
windows10, visual studio 2022
7 replies
CC#
Created by P A T R I C K on 11/29/2022 in #help
Warn counter reseting and not updating
private readonly Dictionary<ulong, Dictionary<ulong, int>> _warns = new();

public async Task WarnGuildMemberAsync(SocketGuildUser member, [Remainder] string? reason = null)
{
ulong guildId = Context.Guild.Id;
ulong memberId = member.Id;

if (!_warns.ContainsKey(guildId))
{
_warns[guildId] = new(); // new() => Dictionary<ulong, int> | ulong key contains the member id
}

if (!_warns[guildId].ContainsKey(memberId))
{
_warns[guildId][memberId] = 0;
}

Console.WriteLine(_warns[guildId][memberId]);
_warns[guildId][memberId]++;
Console.WriteLine(_warns[guildId][memberId]);
}
private readonly Dictionary<ulong, Dictionary<ulong, int>> _warns = new();

public async Task WarnGuildMemberAsync(SocketGuildUser member, [Remainder] string? reason = null)
{
ulong guildId = Context.Guild.Id;
ulong memberId = member.Id;

if (!_warns.ContainsKey(guildId))
{
_warns[guildId] = new(); // new() => Dictionary<ulong, int> | ulong key contains the member id
}

if (!_warns[guildId].ContainsKey(memberId))
{
_warns[guildId][memberId] = 0;
}

Console.WriteLine(_warns[guildId][memberId]);
_warns[guildId][memberId]++;
Console.WriteLine(_warns[guildId][memberId]);
}
2 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
ok i will check ty
13 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
maybe not a condition but something to get this
13 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
I would like to make a condition so as to have if the message contains the word of the array
13 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
string[] blacklistedWords = new string[]
{
"world"
}

string message = "hello world"
string[] blacklistedWords = new string[]
{
"world"
}

string message = "hello world"
13 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
ok look
13 replies
CC#
Created by P A T R I C K on 10/20/2022 in #help
Check if a string contains a word in an array
and the best would be not to use a loop, because the string will be analyzed at each message
13 replies