S-IERRA•272d ago
whats wrong
SylveonDeko•272d ago
that^
Angius•272d ago
what
SylveonDeko•272d ago
channel is not null but it returns prematurely
but doesnt touch the actual return;
S-IERRA•272d ago
ur on ridewr?
SylveonDeko•272d ago
correct
S-IERRA•272d ago
S-IERRA•272d ago
igh sick run w debugger
and hover over the variable for me
SylveonDeko•272d ago
its on lol
Angius•272d ago
It's really hard to say what's wrong by just seeing 3 lines of code
S-IERRA•272d ago
can u hover over the var and show me what the values are
SylveonDeko•272d ago
now, why do you think im saying its not null?
onefuture•272d ago
@new FuckPremiumBots() have you considered this
onefuture•272d ago
PHP: Hypertext Preprocessor
PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.
S-IERRA•272d ago
f10
blinkbat•272d ago
...why
Jimmacle•272d ago
this is not a helpful suggestion
SylveonDeko•272d ago
wat.
S-IERRA•272d ago
see what it says
ah
ok
onefuture•272d ago
im guessing you are using discord.net right?
SylveonDeko•272d ago
yes
onefuture•272d ago
GitHub
GitHub - discord-php/DiscordPHP: An API to interact with the popula...
An API to interact with the popular messaging app Discord - GitHub - discord-php/DiscordPHP: An API to interact with the popular messaging app Discord
S-IERRA•272d ago
@new FuckPremiumBots() it could be that its failing to fetch the channel
onefuture•272d ago
heres a better alternative
Jimmacle•272d ago
are you trying to speedrun a ban?
SylveonDeko•272d ago
how
S-IERRA•272d ago
S-IERRA•272d ago
here
SylveonDeko•272d ago
im literally giving it the channel
S-IERRA•272d ago
yes but discord is weird
had the same issue in py
SylveonDeko•272d ago
S-IERRA•272d ago
uhm can you try to run w/o debugger
SylveonDeko•272d ago
the method thats calling it
ok
blinkbat•272d ago
oh finally a whole block of code
onefuture•272d ago
almost blinded myself looking at that
SylveonDeko•272d ago
you aint gonna have no future if you keep being an attention seeking brat
let alone 1future
S-IERRA•272d ago
just ignore
blinkbat•272d ago
that code block doesn't look like the bug you experienced
SylveonDeko•272d ago
ik, just had to get that out
onefuture•272d ago
ask chat gpt to optimize it
SylveonDeko•272d ago
ik, thats whats caling the method
sec
this all stems from a previous jank issue lol
blinkbat•272d ago
it could be hitting any of those returns
SylveonDeko•272d ago
onefuture•272d ago
SylveonDeko•272d ago
where for some reason channel was null
S-IERRA•272d ago
yes
like i said
SylveonDeko•272d ago
but
that was only socket
S-IERRA•272d ago
it could be failing to fetch it as a fallback value
SylveonDeko•272d ago
rest returns it fine
S-IERRA•272d ago
missing intent
most likley
SylveonDeko•272d ago
nope
S-IERRA•272d ago
weird
SylveonDeko•272d ago
all intents on and configured
blinkbat•272d ago
debug after that line
see the value of channel
SylveonDeko•272d ago
that code is long changed, channel is null becausse its null for some reason
despite not being null in the calling method
blinkbat•272d ago
why would you send old code
SylveonDeko•272d ago
^
blinkbat•272d ago
do you have a bug or not
SylveonDeko•272d ago
yes
onefuture•272d ago
blinkbat•272d ago
can you like stop
maybe
onefuture•272d ago
...
Jimmacle•272d ago
just report and move on
onefuture•272d ago
im sending better code
SylveonDeko•272d ago
channel is NOT null here so im confused af
S-IERRA•272d ago
@new FuckPremiumBots() im thinking it could be race contition related
SylveonDeko•272d ago
oh boy thats fun
S-IERRA•272d ago
because if ur doing an async operation then its failing to fetch it in time
then its ffailing on the if statement
SylveonDeko•272d ago
definitely possible
S-IERRA•272d ago
because when you run it thru debugger it worked
SylveonDeko•272d ago
lovely
what could the race condition be tho
S-IERRA•272d ago
it wouldnt make sense tho
cuz ur awaiting it
SylveonDeko•272d ago
the async methods dont run
since i give the values
and they arent null
S-IERRA•272d ago
S-IERRA•272d ago
on debugger
can u check
SylveonDeko•272d ago
yeah
S-IERRA•272d ago
wait u did
nvm
SylveonDeko•272d ago
thats why channel isnt null
im losing braincells trying to figure this out lmao
S-IERRA•272d ago
write ITextChannel?
S-IERRA•272d ago
even with IGuild
SylveonDeko•272d ago
yes
S-IERRA•272d ago
im pretty sure thats the issue
SylveonDeko•272d ago
why would that be an issue
S-IERRA•272d ago
isnt nullable
and over c# 8 thats an issue
SylveonDeko•272d ago
it is you mean
put a ?
S-IERRA•272d ago
yes
ITextChannel? inputChannel = null
SylveonDeko•272d ago
in which case it shouldnt matter because i do the same with my commands and it doesnt have an issue
S-IERRA•272d ago
just try it see what it does
SylveonDeko•272d ago
alr
S-IERRA•272d ago
if not what u can also do
there should be a nullable over ride method HasValue when you make it nullable
so set it to what i said above and then check
if(inputChannel.HasValue)
SylveonDeko•272d ago
SylveonDeko•272d ago
same with inputchannel
S-IERRA•272d ago
ignore that then
but ud put that on the if statement
SylveonDeko•272d ago
running it with ? still makes it stop
S-IERRA•272d ago
not the assignment
SylveonDeko•272d ago
oh
S-IERRA•272d ago
1s
SylveonDeko•272d ago
wait
S-IERRA•272d ago
?
SylveonDeko•272d ago
nvm
S-IERRA•272d ago
r u sure its failing at that point w/o debugger
SylveonDeko•272d ago
yes
i can add console logs 🤷♂️
S-IERRA•272d ago
yes, would be good
i feel like they might have over ridden the is operator
and its doing some more bs
SylveonDeko•272d ago
lets see
onefuture•272d ago
Blud is discord support
for FREE
SylveonDeko•272d ago
wat.
SylveonDeko•272d ago
this makes no fucking sense
S-IERRA•272d ago
yh was right then
its failing somewhere down the line
SylveonDeko•272d ago
but then
SylveonDeko•272d ago
this would have stopped it
SylveonDeko•272d ago
i put a debug marker there too
Patrick•272d ago
!ban @1ftr trolling
SylveonDeko•272d ago
wat.
S-IERRA•272d ago
try putting logs line by line tbf, then you ll haev a betetr idea
SylveonDeko•272d ago
S-IERRA•272d ago
ch wouldnt error
thats just assignment
its just null
SylveonDeko•272d ago
ofc it wouldnt but it would at least stop
right?
S-IERRA•272d ago
nah
is just an empty assignment
no reason to stop
SylveonDeko•272d ago
S-IERRA•272d ago
press f11
SylveonDeko•272d ago
ok so it turns out im just a moron got it
S-IERRA•272d ago
prolly this
SylveonDeko•272d ago
weird
S-IERRA•272d ago
idk what this method does but could be this?
S-IERRA•272d ago
but ye
it ssomewhere there
SylveonDeko•272d ago
heard this and have been using it ever since:
To avoid these problems, we can use ConfigureAwait(false) to tell await not to capture and resume on the current context, but instead resume on any available thread. This can improve performance, scalability and avoid deadlocks in some scenarios
Angius•272d ago
It's only really useful in old .NET Framework and in libraries
SylveonDeko•272d ago
ah
got it
Angius•272d ago
I don't think it does anything useful since Core
Try yeeting it all and see what happens
SylveonDeko•272d ago
trying
SylveonDeko•272d ago
yknow im a massive moron sometimes
SylveonDeko•272d ago
ok yeah it doesnt fail there
S-IERRA•272d ago
so far so good
btw just for future reference
try doing what i do
SylveonDeko•272d ago
?
S-IERRA•272d ago
sec i ll give context
so when u have an error dont just do an empty return
try to atleast log it
makes ur life x1000 easier
SylveonDeko•272d ago
yeah
also i just realized the dumb i did lel
S-IERRA•272d ago
what was wrong
SylveonDeko•272d ago
before i fixed it, this was just checkking is null
SylveonDeko•272d ago
and of course, it was just see if that fixes it lel
it did not, bug hunting time
SylveonDeko•272d ago
and fixed it
SylveonDeko•272d ago
kek
thx guys for guiding me through my stupidity
its been a day today
S-IERRA•272d ago
nws nws
happens
currently im loosing my shit too over a ticket below you so
SylveonDeko•272d ago
lolol
good luck
jcotton42•272d ago
it still does the same thing
it doesn't use the active sync context to schedule the continuation
for example, in a GUI app @ZZZZZZZZZZZZZZZZZZZZZZZZZ
in the case of a discord bot, you probably don't have a sync context, so it won't affect anything either way
Angius•272d ago
Didn't something change about it with Core?
jcotton42•272d ago
Stephen Toub - MSFT
.NET Blog
ConfigureAwait FAQ - .NET Blog
.NET added async/await to the languages and libraries over seven years ago. In that time, it’s caught on like wildfire, not only across the .NET ecosystem, but also being replicated in a myriad of other languages and frameworks. It’s also seen a ton of improvements in .NET,
jcotton42•272d ago
not how it works fundamentally
Accord•270d ago
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
52KMembers
View on DiscordWant results from more Discord servers?
More Posts❔ ASP.NET always validates invalid JWTI have a custom configuration for Asp.net where the JWT Token is stored in an http-only cookie, beca❔ Class with Func<> and class initializersIf I define a class with members to be passed to known create type functions how do I set the Func<>✅ .NET MVC - AJAX BEGINFORM UpdateTargetId not workingHi, I want to update my table after insert and update with ajax beginform. I give updatetargetid the[WPF] Creating grouped content in XAML to hide.Hi,
Is it possible to group multiple UI elements into a group, and then hide the entire group, whil❔ Blazor for a C# beginner?Essentially, i wanted to get into web dev, and found out that you don't actually need to learn js. IProblemDetails and FluentValidationIm having issues returning/throwing a custom exception made with ProblemDetails.
Im using FluentVali❔ C# Beginner BookDoes anybody know any good books worth reading about c# for begginers? primarily focused on WPF, butWPF can't access to ElementName with ControlTemplatehttps://paste.mod.gg/njerxhgbdgzp/0Namespace needed or not?Hello. I am a python coder (still quite new) who wants to branch out to C# as it is used for Unity aUnclear class creationhow would i go about resolving this error? This is what im getting: ```Error while compiling: Island❔ Creating A Share Button in avaloniaI have a button
```xml
<Button Grid.Column="2" Command="{Binding $parent[Window].DataContext.ShareEnCustom MSBuild task fails to load `System.Runtime`Hi, I'm making a custom MSBuild task that needs to load images and I was using `ImageSharp` for that❔ Cannot convert lambda expression to type 'Activity' because it is not a delegate type errorSo I want to check if List contains element with todays date but tis error occurs:
`CS1660 Canno❔ Need help implementing a toolboxWhat's a good way to implement something like this? Currently I have some services, all of which imp❔ ASP .NET Core Controller Default Route IssueI have a controller (TestController) with an Index action method.
The url I'm using is "localhost:8❔ Hiya i am new to C# i am having problems with return method``` static void Main(string[] args)
{
Console.WriteLine("Hello World!");
int ✅ How to return List from RestClient?Hi, I am making rest client for my application using RestSharp (like their twitter client in guide <❔ is there any moderate projects to read and study?I built a simple website after learning web dev but I lost my direction to improve. I want to study ❔ This issue cannot be resolved for several hours. HELP ME...The problem is the character on the red mark in the picture below. This is the source code where the❔ Dynamically adding xaml code from 1 page to another pages xaml codeI'm working on a simple barbershop application that let's people make appointments etc. At the momen