We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8ee0274 + 4d15b21 commit 5d852e2Copy full SHA for 5d852e2
Deployf.Botf/System/UpdateContextExtensions.cs
@@ -104,6 +104,15 @@ public static string GetUserFullName(this IUpdateContext context)
104
105
return first + " " + last;
106
}
107
+ public static string? GetLangCode(this IUpdateContext context)
108
+ {
109
+ var value = context.Update.Message?.From?.LanguageCode
110
+ ?? context.Update.EditedMessage?.From?.LanguageCode
111
+ ?? context.Update.CallbackQuery?.From?.LanguageCode
112
+ ?? context.Update.InlineQuery?.From?.LanguageCode;
113
+
114
+ return value;
115
+ }
116
117
public static void StopHandling(this IUpdateContext context)
118
{
0 commit comments