Coder Social home page Coder Social logo

Comments (7)

Plerx2493 avatar Plerx2493 commented on September 26, 2024 1

It sounds like you use one application and uses it to open gateway clients on each member pc which uses your app. So you would be temp banned for to many connections

from dsharpplus.

Plerx2493 avatar Plerx2493 commented on September 26, 2024

Is discord a DiscordClient or DiscordRestClient?

from dsharpplus.

akiraveliara avatar akiraveliara commented on September 26, 2024

we'd need a clearer link between "bot operates" and "member has issues" than this. if you have any logs to provide that look off, please post them, but this is impossible to accomplish using the supported API - if you are selfbotting or using undocumented routes, we cannot help you

from dsharpplus.

vekien avatar vekien commented on September 26, 2024

So I have a program which has code like I posted. It uses our bot key for that coders when the program loads it runs that code.

After that, users are being temp suspended on discord and going to https://discord.com/api/gateway shows they we are temporarily suspended

there is no other code, I can print the whole code if it helps. It runs once every 5 minutes for those 3 calls. And after it has run a few times weโ€™re being suspended by discord.

is this a discord issue? And how would this even happen? As it seems it would happen no matter what we do with discord sharp.

from dsharpplus.

vekien avatar vekien commented on September 26, 2024

Is discord a DiscordClient or DiscordRestClient?

Discord client.

Full Code:


DispatcherTimer timerAnnouncements = new();
timerAnnouncements.Tick += (sender, e) =>
{
   _ = RenderLatestDiscordAnnouncement();
};
timerAnnouncements.Interval = TimeSpan.FromMilliseconds(300 * 1000);
timerAnnouncements.Start();
			
			
public static async Task<string[]> GetLatestAnnouncementAsync()
        {
			var discord = new DiscordClient(new DiscordConfiguration()
			{
				Token = DISCORD_BOT_TOKEN,
				TokenType = TokenType.Bot,
				Intents = DiscordIntents.AllUnprivileged | DiscordIntents.MessageContents
			});

			DiscordChannel channel = await discord.GetChannelAsync(DISCORD_CHANNEL);
			DiscordGuild guild = await discord.GetGuildAsync(DISCORD_SERVER);

			IAsyncEnumerable<DiscordMessage> messages = channel.GetMessagesAsync(10);

			List<string> announcement = new();
			await foreach (DiscordMessage message in messages)
			{
				// Too short? continue
				if (message.Content.Length < 3)
				{
					continue;
				}

				DiscordMember member = await guild.GetMemberAsync(message.Author.Id);
				DateTime messageUtc = message.Timestamp.UtcDateTime;

				string content = message.Content;
				content = ReplaceUnixTimestampWithRelativeTime(content);

				announcement.Add(member.Nickname);
				announcement.Add(member.Color.ToString());
				announcement.Add(content);
				announcement.Add(messageUtc.ToLocalTime().ToString());
				break;
			}

			return announcement.ToArray();
		}

from dsharpplus.

vekien avatar vekien commented on September 26, 2024

It sounds like you use one application and uses it to open gateway clients on each member pc which uses your app. So you would be temp banned for to many connections

I see, why would it ban for single users?

from dsharpplus.

vekien avatar vekien commented on September 26, 2024

I think for this the issue is we have one bot key being used by multiple clients and then itโ€™s just temp blocking IPs, like you said too many connections.

we are going to look at another approach and consider this an issue with my approach to implement discord and my fault.

thanks!

from dsharpplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.