Saravanan666/pypi-org huggingface dataset:
Package: discord-passport
Discord-Passport v0.1Way to make simple Discord OAuth2How it work?+pip install discord-passportMake the Authimportdiscord_passportasdpOauth=dp.Oauth2(token="Bot Token",client_secret="Bot Client Secret ",client_id="Bot ID",redirect_uri="Oauth Redirect URL")Oauth.OAuth2Code("Code from OAuth2Code")print(Oauth.getUserAvatar)# Return AvatarLinkprint(Oauth.getUserName)# Return Name Like iExiprint(Oauth.getUserDiscriminator)# Return Discriminator Like #0416print(Oauth.getUserPremiumType)# Return PremiumTypeLike 0 1 2"""0:None1:Discord Nitro Classic2:Discord Nitro Gaming"""print(Oauth.getUserEmail)# Return Email like email@iexi.xyzprint(Oauth.getUserFlags)# https://discord.com/developers/docs/resources/user#user-object-user-flagsAny Error Contact me : iExi#0416Or enter :Developer Support
Package: discord-plays-nationstates
discord-plays-nationstates is aDiscordbot developed to enable sharing the experience of governing aNationStatesnation with your fellow chatmates.Installationpip install discord-plays-nationstates
pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py
discord-plays-nationstates \
   --token YOUR_DISCORD_API_TOKEN \
   --useragent YOUR_NATIONSTATES_USERAGENT \
   --nation NAME_OF_YOUR_NATION \
   --password PASSWORD_TO_YOUR_NATION \
   --channel ID_OF_THE_DISCORD_CHANNEL_YOU_WANT_TO_USEUsageusage: discord-plays-nationstates [-h] --token TOKEN --useragent USERAGENT
                                  --nation NATION --password PASSWORD
                                  --channel CHANNEL

optional arguments:
  -h, --help            show this help message and exit

required arguments:
  --token TOKEN         The token for your Discord bot
  --useragent USERAGENT
                        User-Agent header for the NationStates API
  --nation NATION       Name of the nation you want to answer issues of
  --password PASSWORD   Password to the nation
  --channel CHANNEL     ID of the Discord channel to useDependenciesPython 3.6.1+- Programming languagediscord.py rewrite- Wrapper for the Discord APIaionationstates- Wrapper for the NationStates APILicensediscord-plays-nationstates - a bot to control a NationStates nation from a Discord chat.
Copyright (C) 2018  Михаил Лебедев

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: discord-port
Discord PortWay to make an easy Oauth2 with discord APIHow it's work?pip install discord-portCreate AuthClientimportdiscord_portpassport=discord_port.AuthClient(c,client_id=None,client_secret=None,redirect_uri=None)Exchange for the codeimportdiscord_portpassport=discord_port.AuthClient(c,client_id=None,client_secret=None,redirect_uri=None)#This using a framework called FLASK `pip install flask`@app.route('/discord/api/oauth2')defoauth():paylaod_recived=passport.get_code(request.args["code"])"""The payload will return as{"access_token": "6qrZcUqja7812RVdnEKjpzOL4CvHBFG","token_type": "Bearer","expires_in": 604800,"refresh_token": "D43f5y0ahjqew82jZ4NViEr2YafMKhue","scope": "identify"}"""returnpaylaod_recived["access_token"]Get UserLoggedimportdiscord_portdiscord_port.UserAPI(code="access_token").get_userMade by 🇮🇶 Iraqi hands : airbu#1745 in7:40AM GMT+3
Package: discord-protos
Discord Protocol BuffersReverse-engineering Discord's user settings protobufs.This repository provides protocol buffer files for Discord's user settings automatically generated and automatically updated. The protobufs are provided as .proto files in the out/ directory, one file per settings type.These protobufs are used by the Discord clients for user settings.Provided for educational purposes only.UsageNoteAutomating user accounts is against the Discord ToS. This repository is a proof of concept and I cannot recommend using it. Do so at your own risk.Installation# with npm
npm install discord-protos

# with yarn
yarn add discord-protos

# with pnpm
pnpm add discord-protos

# with pip
pip install discord-protosExampleJavaScript:const{PreloadedUserSettings}=require('discord-protos');constencoded=PreloadedUserSettings.toBase64({status:{status:{value:"online",},customStatus:{text:"Hello World",emojiId:0n,emojiName:"",expiresAtMs:0n,},},});constdecoded=PreloadedUserSettings.fromBase64(encoded);console.log(encoded,decoded);Python:importbase64fromdiscord_protosimportPreloadedUserSettingssettings=PreloadedUserSettings()encoded=base64.b64encode(settings.ParseDict({'status':{'status':{'value':'online',},'custom_status':{'text':'Hello World','emoji_id':0,'emoji_name':'','expires_at_ms':0,},},}).SerializeToString())decoded=PreloadedUserSettings.FromString(base64.b64decode(encoded))print(encoded,decoded)MappingThe following table shows which protobuf user settings correspond to which .proto file (the Python package also provides aUserSettingsTypeenum for convenience).TypeValueFileUse1PRELOADED_USER_SETTINGSPreloadedUserSettings.protoGeneral Discord user settings.2FRECENCY_AND_FAVORITES_SETTINGSFrecencyUserSettings.protoFrecency and favorites storage for various things.3TEST_SETTINGS-Unknown.ProtobufsThe .proto files can be compiled down to Python or JavaScript files by runningnpm run pyornpm run js. This requires protoc to be installed.Base64-encoded data for these protobufs are provided by theGET /users/@me/settings-proto/{type}endpoint. For preloaded user settings, base64-encoded data is provided in theuser_settings_protokey of the READY event received in the Discord Gateway, as well as in USER_SETTINGS_PROTO_UPDATE events.DevelopmentRunningpnpm loadwill extract and save the latest protobufs to the discord_protos/ directory.
Package: discordproxy
discordproxyProxy server for accessing the Discord API via gRPCOverviewDiscord Proxyis a proxy server that provides access to the Discord API via gRPC.The main purpose is to enable applications to use the Discord API without having to implement Discord's websocket protocol. Instead, applications can use the gRPC API and the proxy will resolve all requests with the Discord API server via websockets or HTTP.Python applications can import the generated gRPC client directly. Applications in other languages can use the protobuf definition to generate their own gRPC client.DocumentationFor more information please see thedocumentation.
Package: discord-publisher
discord-publisherDiscord 공지 채널에 메세지를 발신해보세요!설명이 모듈은discord.py에 사용될 수 있도록 비동기로 제작되었습니다.제작자Happytree Samsung연락하기이메일 :samsunghappytree123@teamht.cf디스코드 :Happytree Samsung#7612사용 설명pip install Discord-publisherimportdiscord_publisherpb=discord_publisher.Publisher('이곳에 봇 토큰을 넣어주세요.','이곳에 채널 아이디를 넣어주세요.','이곳에 전송할 메세지 아이디를 넣어주세요.')pb.postnotice()버그제보 & 기여버그제보 받습니다.깃허브 이슈기여는 대환영입니다!레포지토리 포크하기
Package: discord.py
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord.py# Windowspy-3-mpipinstall-Udiscord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"discord.py[voice]"# Windowspy-3-mpipinstall-Udiscord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/Rapptz/discord.py$cddiscord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that when installing voice support on Linux, you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.8-devfor Python 3.8)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')intents=discord.Intents.default()intents.message_content=Trueclient=MyClient(intents=intents)client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsintents=discord.Intents.default()intents.message_content=Truebot=commands.Bot(command_prefix='>',intents=intents)@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: discord-py-activity
How to installpipinstalldiscord-py-activityset upac = activities.activity("Your bot token")importdiscordbot=discord.Client()ac=activities.activity(TOKEN)@bot.eventasyncdefon_ready():print(f"The bot{bot.user.name}is up")if__name__=="__main__":bot.run(TOKEN)Featuresget invite link to activityicon_urlnamecreated_at (Invite code)expires_at (Invite code)Activity includedWatch_TogetherPoker_NightBetrayal_ioFishington_ioChess_In_The_ParkSketchy_ArtistAwkwordDelete_Me_CallaDoodle_CrewSketch_HeadsLetter_LeagueWord_SnacksSpellCastCheckers_In_The_ParkBlazing_8sPutt_PartyLand_ioBobble_LeagueAsk_AwayKnow_What_I_MemeSet activity channelimportdiscordbot=discord.Client()ac=activities.activity(TOKEN)@bot.eventasyncdefon_ready():print(f"The bot{bot.user.name}is up")@bot.eventasyncdefon_message(msg):args=msg.content.split()ifargs[0]==f"ac":ac_var=ac.new_link(msg.channel,activities.get_id_of().Watch_Together)if__name__=="__main__":bot.run(TOKEN)Get name/link/icon url/created_at/expires_at example/channelimportdiscordbot=discord.Client()ac=activities.activity(TOKEN)@bot.eventasyncdefon_ready():print(f"The bot{bot.user.name}is up")@bot.eventasyncdefon_message(msg):args=msg.content.split()ifargs[0]==f"ac":ac_var=ac.new_link(msg.channel,activities.get_id_of().Watch_Together)ac_var.nameac_var.channelac_var.created_atac_var.expires_atac_var.icon_urlac_var.linkif__name__=="__main__":bot.run(TOKEN)Embedimportdiscordbot=discord.Client()ac=activities.activity(TOKEN)@bot.eventasyncdefon_ready():print(f"The bot{bot.user.name}is up")@bot.eventasyncdefon_message(msg):args=msg.content.split()ifargs[0]==f"ac":ac_var=ac.new_link(msg.channel,activities.get_id_of().Watch_Together)awaitmsg.channl.send(ac_var.make_embed())if__name__=="__main__":bot.run(TOKEN)The embed codeYou can just change the values you wantembed_var=discord.Embed(title=self.name,description=f"[Press here]({self.link})")embed_var.add_field(name="created at:",value=self.created_at[:10])embed_var.add_field(name="end at:",value=self.expires_at[:10])embed_var.add_field(name="Channel:",value=self.channel.mention)embed_var.set_thumbnail(url=self.icon_url)returnembed_varGet all Activity as dictionaryactivities.get_id_of.to_dict()Will return a dictionary that work like this:
Name = id
activities.get_id_of.to_dict()["Watch_Together"] will return the Watch_Together id
Package: discordpy-antispam
Spam FilterA simple and efficient spam filter built to be used in discord bots made with any fork ofdiscord.py!Installationpip install git+https://github.com/DorianAarno/SpamFilter.gitUsageQuickstart GuidefromSpamFilterimportAntiSpam@bot.eventasyncdefon_message(msg):spam_check=AntiSpam().check(bot,msg.channel,msg.author)Detailed GuidefromSpamFilterimportAntiSpamdictionary_check=True# Default is False, DO NOT USE THIS IF YOUR SERVER IS MULTI-LINGUAL, Checks if any word in the message is present in english dictionary.timer_check=True# Default is True, Checks if a member has sent more than 5 messages within 15 seconds, if yes, 6th message is marked as spam.content_check=True# Default is True, Checks the message's content and if a letter whose occurance in the content is highest covers more than 85% of the content, it marks the message as spam.history_check=True# Default is True, Checks if the message's content is duplicate of the previous message.@bot.eventasyncdefon_message(msg):spam_check=AntiSpam(dictionary=dictionary_check,timer=timer_check,content=content_check,history=history_check).check(bot,msg.channel,msg.author)ExampleYou may view implementation of this library inPointsBot.NotesThis library has only been tested withdiscord-disnake.Your bot needs to have access to message content.ContributingFork the repository.Add your desired change or filter.Open pull request.Issues are welcome.Consider giving this repository a ⭐, It is highly appreciated!LicenseThis repository has been made available viaMITLicense.
Package: discord-py-api
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord-py-api# Windowspy-3-mpipinstall-Udiscord-py-apiOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"discord-py-api[voice]"# Windowspy-3-mpipinstall-Udiscord-py-api[voice]Optional PackagesPyNaCl(for voice support)Please note that when installing voice support on Linux, you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordfrombotwayimportGetTokenclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')intents=discord.Intents.default()intents.message_content=Trueclient=MyClient(intents=intents)client.run(GetToken())Bot Exampleimportdiscordfromdiscord.extimportcommandsfrombotwayimportGetTokenintents=discord.Intents.default()intents.message_content=Truebot=commands.Bot(command_prefix='>',intents=intents)@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run(GetToken())You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: discordpy-bot-cli
discordpy-bot-clidiscordpy-cli is a CLI that helps in making Discord bots easily. It is used with discord.py and can be installed with PIP.FeaturesAuto check-and-update. No manual updation.Variations in project making: .env and no .env file projects.Hosting: Git and Heroku, and Github and Heroku.Commands to simplify tasks.InstallationTo install discordpy-bot-cli use this command in terminal:pip install discordpy-bot-cliCommandsThis CLI has 4 commands.init: Initializes a Discord bot project.cog: Creates a cog file and adds setup.deploy: Deploys the bot (Use with Git and Heroku).wrap: Creates a requirements file (Use with Github and Heroku).And to use these, typedcpyfollowed by the command.To know more about commands and options, dodcpy --help.
Package: discord.py-Console
Discord.py-ConsoleDiscord.py Console is a command line tool that allows you to control your bot and execute commands,so you canuse your Bot in the terminal/consoleand run Discord commands as usual.InstallationWindowspy -3 -m pip install discord.py-ConsoleLinux/macOSpython3 -m pip install discord.py-ConsoleUsage and ExampleThe implementation is similar to the regular commands in discord.py.
Just implement the discord.py-Console like this:importdiscordfromdpyConsoleimportConsoleclient=discord.Client(intents=discord.Intents.all())my_console=Console(client)@client.eventasyncdefon_ready():print("I'm Ready")@my_console.command()asyncdefhey(user:discord.User):# Library automatically converts type annotations, just like in discord.py"""Library can handle both synchronous or asynchronous functions"""print(f"Sending message to{user.name}id: ={user.id}")awaituser.send(f"Hello from Console Im{client.user.name}")my_console.start()# Starts console listener (opens new Thread to be nonblocking)client.run("Token")To execute the mentioned command runhey exampleUser#0001orhey <valid_user_id>.Links and InfosNote: You can split up discord.py-Console commands into cogs view an example in the Example folder.PyPI Download
Package: discord-py-dashboard
Установка# ЕСЛИ УСТНОВЛЕНpipinstall--upgradediscord-py-dashboard# ЕСЛИ НЕ УСТАНОВЛЕНpython3-mpipinstall--upgradediscord-py-dashboardПрименениеПредпосылкиПрежде чем приступить к работе, вам понадобится несколько вещей:Вебхук в секретном канале (если у кого-то есть доступ, он сможет все получить лягушку а это плохо).Правильно размещенный ботdiscord.pyИ так поехали!(жабы топ)ПримерыБотimportdiscordfromdiscord.extimportcommandsfromdiscord.ext.dashboardimportDashboardbot=commands.Bot(command_prefix="!")bot_dashboard=Dashboard(bot,"secret_key","https://your-bot-website.com/dashboard")@bot.eventasyncdefon_ready():print(f"Bot is online as{bot.user}")@bot.eventasyncdefon_message(message):awaitbot_dashboard.process_request(message)@bot_dashboard.routeasyncdefguild_count(data):returnlen(bot.guilds)@bot_dashboard.routeasyncdefmember_count(data):returnawaitbot.fetch_guild(data["guild_id"]).member_countbot.run("your-token-here")Веб-серверfromquartimportQuart,requestfromdiscord.ext.dashboardimportServerapp=Quart(__name__)app_dashboard=Server(app,"secret_key",webhook_url="https://your-private-discord-webhook.com",sleep_time=1)@app.route("/")asyncdefindex():guild_count=awaitapp_dashboard.request("guild_count")member_count=awaitapp_dashboard.request("member_count",guild_id=776230580941619251)returnf"Guild count:{guild_count}, Server member count:{member_count}"@app.route("/dashboard",methods=["POST"])asyncdefdashboard():# Don't worry about authorization, the bot will handle itawaitapp_dashboard.process_request(request)if__name__=="__main__":app.run()Обратите внимание, что Cogs в настоящее время не поддерживаются.
Package: discord.py-embed-wrapper
DISCLAIMER!This package is only vaguely tested.InstallingPython 3.6 or higher is requiredother than that it's just as simple aspip install discord.py-embed-wrapperfromembed_wrapperimport*Wrapper Classes - Examples/UsageEmbedFieldto create anEmbedFieldobjectwrapped_field=EmbedField(name=field_name,value=field_value,inline=field_inline)and then use it in the initialisation of anEmbedWrapperEmbedWrapperembed_wrapper=EmbedWrapper(author_name=author_name,author_url=author_url,author_icon_url=author_icon_url,embed_type=embed_type,title=title,url=url,color=color,description=description,timestamp=timestamp,footer_text=footer_text,footer_icon_url=footer_icon_url,image_url=image_url,thumbnail_url=thumbnail_url,fields=[wrapped_field])to finalize and instantiate the embed from the wrapper callembed=embed_wrapper.embedHelper Functions - Examples/Usageembeds_from_messageCreates a List of Embeds from a give Message. Returns None if the given Message didn't have any Embeds.defembeds_from_message(message:Message)->Optional[List[Embed]]:...embeds=embeds_from_message(message=message)send_embed_messageSends a Message including an Embed to either a Guild TextChannel or a DMChannel and returns the sent Message.asyncdefsend_embed_message(embed:Embed,invoking_message:Message,as_reply:bool=False,as_dm:bool=False,dm_channel:DMChannel=None,pin:bool=False,message_content:str="",reactions:List[str]=None,mentions:List[Union[User,Member,Role]]=None,append_mentions:bool=False)->Message:...simplest usageembed_message=awaitsend_embed_message(embed=embed,invoking_message=message)Sends an Embed Message only containing the embed in the same channel it was invoked.edit_embed_messageEdits a given Embed Message with a new Embed and optionally new Message Content and returns the edited Message. Pass None as the Embed to remove it.asyncdefedit_embed_message(embed:Embed,message:Message,message_content:Optional[str],)->Message:...usageembed_message=awaitedit_embed_message(embed=embed,message=embed_message)
Package: discord.py-fork
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.The Future of discord.pyPlease read thegistfor the future of the original project. This is just a fork of it. feel free to contribute in order of keeping it alife!Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingPython 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord.py-fork-vvc# Windowspy-3-mpipinstall-Udiscord.py-fork-vvcOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"discord.py-fork-vvc[voice]"# Windowspy-3-mpipinstall-Udiscord.py-fork-vvc[voice]To install the development version, do the following:$gitclonehttps://github.com/veni-vidi-code/discord.py$cddiscord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that i will not fork this package and do not plan on doing so.
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationDiscord API