frexin
frexin
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
and for some reason it doesn't send the embed message
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
yes
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
sorry*
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
sorru
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
@ZZZZZZZZZZZZZZZZZZZZZZZZZ
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
using RestSharp; using Discord.WebSocket; using System.Threading.Tasks; using Bot.Commands; using Discord; using Newtonsoft.Json; namespace Bot.Command { public class Translations { public string translatedText { get; set; } } public class Data { Translations translations { get; set; } } public class Api { Data data { get; set; } } public class ÇeviriCommmand : ICommand { public string CommandName => "!çeviri"; public async Task ExecuteAsync(SocketMessage message) { string yazı = message.Content; if (string.IsNullOrEmpty(yazı)) { await (message as IUserMessage).ReplyAsync("Lütfen Bir Metin Girin"); } var client = new RestClient("https://deep-translate1.p.rapidapi.com/language/translate/v2"); var request = new RestRequest("posts", Method.Post); request.AddJsonBody(new { q = yazı, source = "tr", target = "en" }); request.AddHeader("x-rapidapi-host", "deep-translate1.p.rapidapi.com"); request.AddHeader("Content-Type", "application/json"); RestResponse response = client.Execute(request); Api sonuc = JsonConvert.DeserializeObject<Api>(response.Content); var embed = new EmbedBuilder() .WithDescription($"
{sonuc.data.translations.translatedText}
{sonuc.data.translations.translatedText}
") .Build(); await message.Channel.SendMessageAsync(embed: embed); } } }
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
Can you wait a bit? I'm not available right now.
20 replies
CC#
Created by frexin on 10/6/2024 in #help
There is a typo error and I can't figure it out
oky
20 replies