Saravanan666/pypi-org huggingface dataset:
Package: discord-py-interactions
Interactions.pyA Feature-rich Discord Bot Framework for PythonA highly extensible, easy to use, and feature complete framework for Discord.interactions.pyis the culmination of years of experience with Discord's APIs and bot development. This framework has been built from the ground up with community feedback and suggestions in mind. Our framework provides a modern and intuitive set of language bindings for easy interaction with Discord.Key Featuresinteractions.py offers a wide range of features for building Python-powered Discord bots and web applications alike:✅ 100% coverage of the Discord API✅ Dynamic cache with TTL support✅ Modern and Pythonic API for easy interaction with Discord✅ Proper rate-limit handling✅ Feature parity with most other Discord API wrappers✅ Fully automated command synchronisationIn addition to core functionality,interactions.pyprovides a range of optional extensions, allowing you to further customize your bot and add new features with ease.ExtensibilitySo the base library doesn't do what you want? No problem! With builtin extensions, you are able to extend the functionality of the library. And if none of those pique your interest, there are a myriad of other extension libraries available.Just typebot.load_extension("extension")ExtensionsPrefixed CommandsPrefixed commands, message commands, or legacy commands.
Whatever you want to call them, by default theinteractions.pylibrary will not handle these. But rest assured this extension will get you going✅ Automatic command registration✅ Annotation supportDebug ExtensionA fully featured debug and utilities suite to help you get your bots madeJuriggedA hot reloading extension allowing you to automagically update your bot without rebootsSentryIntegrates Sentry.io error tracking into your bot with a single lineConsoleAddsaiomonitorsupport with enables cli commands over a web interfacePaginatorsEasily create multi-page embeds without having to implement the UXWhere do I start?Getting started withinteractions.pyis easy! Simply install it viapipand start building your Discord application in Python:pip install -U discord-py-interactionsimportinteractionsbot=interactions.Client()@interactions.listen()asyncdefon_startup():print("Bot is ready!")bot.start("token")Withinteractions.py, you can quickly and easily build complex Discord applications with Python. Check out ourguidesfor more information. Or join ourdiscord.
Package: discord-py-legacy
discord.py legacydiscord.py is an API wrapper for Discord written in Python.This was written to allow easier writing of bots or chat logs. Make sure to familiarise yourself with the API using thedocumentation.Note: This repo is simply a backport of some breaking API changes.Breaking ChangesThe discord API is constantly changing and the wrapper API is as well. There will be no effort to keep backwards compatibility in versions beforev1.0.0.I recommend that you follow the discussion in theunofficial Discord API discord channeland update your installation periodically. I will attempt to make note of breaking changes in the API channel so make sure to subscribe to library news by typing?sub newsin the channel.InstallingTo install the library without full voice support, you can just run the following command:python3 -m pip install -U discord.pyOtherwise to get voice support you should run the following command:python3 -m pip install -U discord.py[voice]To install the development version, do the following:python3 -m pip install -U https://github.com/Rapptz/discord.py/archive/master.zip#egg=discord.py[voice]or the more long winded from cloned source:$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,yum, etc) before running the above command:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.5-devfor Python 3.5)Quick Exampleimportdiscordimportasyncioclient=discord.Client()@client.eventasyncdefon_ready():print('Logged in as')print(client.user.name)print(client.user.id)print('------')@client.eventasyncdefon_message(message):ifmessage.content.startswith('!test'):counter=0tmp=awaitclient.send_message(message.channel,'Calculating messages...')asyncforloginclient.logs_from(message.channel,limit=100):iflog.author==message.author:counter+=1awaitclient.edit_message(tmp,'You have{}messages.'.format(counter))elifmessage.content.startswith('!sleep'):awaitasyncio.sleep(5)awaitclient.send_message(message.channel,'Done sleeping')client.run('token')Note that in Python 3.4 you use@asyncio.coroutineinstead ofasync defandyield frominstead ofawait.You can find examples in the examples directory.RequirementsPython 3.4.2+aiohttplibrarywebsocketslibraryPyNaCllibrary (optional, for voice only)On Linux systems this requires thelibffilibrary. You can install in
debian based systems by doingsudo apt-get install libffi-dev.Usuallypipwill handle these for you.Related Projectsdiscord.jsdiscord.ioDiscord.NETDiscordSharpDiscord4Jdiscordrb
Package: discordpy-legacy
discord.py legacydiscord.py is an API wrapper for Discord written in Python.This was written to allow easier writing of bots or chat logs. Make sure to familiarise yourself with the API using thedocumentation.Note: This repo is simply a backport of some breaking API changes.Breaking ChangesThe discord API is constantly changing and the wrapper API is as well. There will be no effort to keep backwards compatibility in versions beforev1.0.0.I recommend that you follow the discussion in theunofficial Discord API discord channeland update your installation periodically. I will attempt to make note of breaking changes in the API channel so make sure to subscribe to library news by typing?sub newsin the channel.InstallingTo install the library without full voice support, you can just run the following command:python3 -m pip install -U discord.pyOtherwise to get voice support you should run the following command:python3 -m pip install -U discord.py[voice]To install the development version, do the following:python3 -m pip install -U https://github.com/Rapptz/discord.py/archive/master.zip#egg=discord.py[voice]or the more long winded from cloned source:$ git clone https://github.com/Rapptz/discord.py
$ cd discord.py
$ python3 -m pip install -U .[voice]Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,yum, etc) before running the above command:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.5-devfor Python 3.5)Quick Exampleimportdiscordimportasyncioclient=discord.Client()@client.eventasyncdefon_ready():print('Logged in as')print(client.user.name)print(client.user.id)print('------')@client.eventasyncdefon_message(message):ifmessage.content.startswith('!test'):counter=0tmp=awaitclient.send_message(message.channel,'Calculating messages...')asyncforloginclient.logs_from(message.channel,limit=100):iflog.author==message.author:counter+=1awaitclient.edit_message(tmp,'You have{}messages.'.format(counter))elifmessage.content.startswith('!sleep'):awaitasyncio.sleep(5)awaitclient.send_message(message.channel,'Done sleeping')client.run('token')Note that in Python 3.4 you use@asyncio.coroutineinstead ofasync defandyield frominstead ofawait.You can find examples in the examples directory.RequirementsPython 3.4.2+aiohttplibrarywebsocketslibraryPyNaCllibrary (optional, for voice only)On Linux systems this requires thelibffilibrary. You can install in
debian based systems by doingsudo apt-get install libffi-dev.Usuallypipwill handle these for you.Related Projectsdiscord.jsdiscord.ioDiscord.NETDiscordSharpDiscord4Jdiscordrb
Package: discordpy-logging-handler
WIP: discordpy-logging-handlerForward Discord bot logs to Discord Text channel.Usageimportloggingimportdiscordfromdiscordpy_logging_handlerimportDiscordBotHandlerLOG_TEXT_CHANNEL_ID=1111111111111logger=logging.getLogger(__name__)classMyClient(discord.Client):asyncdefon_ready(self):logger.info("Logged on as{0}!".format(self.user))asyncdefon_message(self,message):logger.info("Message from{0.author}:{0.content}".format(message))client=MyClient()client.run("my token goes here")log_channel=client.get_channel(LOG_TEXT_CHANNEL_ID)logger.setLevel(logging.DEBUG)handler=DiscordBotHandler(log_channel)handler.setLevel(logging.INFO)# add ch to loggerlogger.addHandler(handler)
Package: discord.py-pagination
discord.py-paginationdiscord.py-pagination is a Python library to easily create embed paginators.InstallationUse the package managerpipto install the library.pipinstalldiscord.py-paginationUsageQuickstartimportPaginator# Create a list of embeds to paginate.embeds=[discord.Embed(title="First embed"),discord.Embed(title="Second embed"),discord.Embed(title="Third embed")]...# Inside a command.awaitPaginator.Simple().start(ctx,pages=embeds)AdvancedTo use custom buttons, pass in the corresponding argument when you initiate the paginator.# These arguments override the default ones.PreviousButton=discord.ui.Button(...)NextButton=discord.ui.Button(...)PageCounterStyle=discord.ButtonStyle(...)# Only accepts ButtonStyle instead of ButtonInitialPage=0# Page to start the paginator on.timeout=42069# Seconds to timeout. Default is 60awaitPaginator.Simple(PreviousButton=PreviousButton,NextButton=NextButton,PageCounterStyle=PageCounterStyle,InitialPage=InitialPage,timeout=timeout).start(ctx,pages=embeds)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: discord.py-paginator
discord.py-paginatorButtons pagination template for discord bots.UseageInstall viapip.py -m pip install -U discord.py-paginator

:: for latest/unstable
py -m pip install -U git+https://github.com/Marseel-E/discord.py-paginatororDownloadthisfolder and place it in your project directory. (or clone it with the following command)git clone https://github.com/Marseel-E/discord.py-paginatorExampleimportdiscordfrompaginatorimportPaginator@discord.app_commands.command()asyncdefcommand_name(interaction:discord.Interaction):pages=[]page_content=""foriinrange(15):if(i>0)and(i%5==0):pages.append(page_content)page_content=""page_content+=f"{i+1}. Item `{i}`\n"if(page_content!="")andnot(page_contentinpages):pages.append(page_content)awaitPaginator(interaction,pages).start()Preview:scroll:LICENSE
Package: discord-py-paginators
Welcome to discord-py-paginators’s documentation!Extension for discord.py that provides various paginators.InstallationStablepython-mpipinstalldiscord-py-paginatorsDevNoteThis requiresgitto be installed on your system.python-mpipinstall-U"discord-py-paginators @ git+https://github.com/Soheab/discord-py-paginators"Usageimportdiscordfromdiscord.extimportcommandsfromdiscord.ext.paginators.button_paginatorimportButtonPaginatorbot=commands.Bot(command_prefix=commands.when_mentioned,intents=discord.Intents(guilds=True,messages=True))@bot.command()asyncdefpaginate(ctx):list_with_many_items=list(range(100))paginator=ButtonPaginator(list_with_many_items,author_id=ctx.author.id)awaitpaginator.send(ctx)# Enjoy!bot.run("token")ExamplesExamples can be found in theexamples directory.LinksDocumentationSource codeDiscord serverContactSend a DM on discord atSoheab_, join thediscord serveror ping me in thediscord.py server.
Package: discord.py-papachar
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 this project. It’s been a good one.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 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.LinksDocumentationOfficial Discord ServerDiscord API
Package: discordpy-replit-heroku
Hosting your repl based discord.py bot on Heroku to keep it runningINDEFINETLYPrerequisitesYou must have an account forDiscord,GitHub,Heroku, andRepl.it(you probably have an account already).1. Create a bot and get its tokenCreate an application in the developer portalhereOpen up your new application and click 'Add Bot' under the Bot settings to create your bot.After creating the bot, click the 'Copy' button under the title Token. Take note of your token as you will need it later.2. Create a new repository from this oneCreate a new repository from this onehere. Follow all the prompts and hit "Create repository from template" This contains all the code you need to host your bot on Heroku.Open a new tab and put in this link:https://repl.it/github/YOUR_GITHUB_USERNAME_HERE/YOUR_REPO_NAME_HERE3. Set up HerokuCreate an application for Herokuhere.Under 'Deploy', do the following:Deployment Method => Connect your GitHubApp connected to GitHub => Search for the forked repositoryAutomatic Deploy => Enable Automatic Deploy (to redeploy after every commit)Under 'Settings', click on 'Reveal Config Vars' and enter the following:KEY => DISCORD_TOKENVALUE => (Enter the bot token that you copied from the developer portal)Click the 'Add' button after entering all of this information.Under 'Resources', do the following:Click on the 'Pencil' icon.Switch the worker from off to on.Click 'Confirm' to finalize the decision.NOTE: You are given 550 free Dyno hours, which will not last the entire month. However, if you provide a credit card to verify your identity, you are given an additional 450 hours, which will allow your bot to run indefinitely.You will not be charged for this.What's next?Now you can tweak the main.py file as you please! just don't mess with the first 5 or last 2 lines (you can change the prefix in line 4 though.)You can change the @app.route stiff in server.pyYou can also change base.html and index.html without changing the stuff inside {% %} or {}, and you are able to change the css and js files freelyDon't change the rest of the files or the name of any file or folder unless you know what you're doingDon't under any circumstances rename the "static" and "templates" foldersOriginal code belongs to audieni. I just made it more suitable for repl.it bot creators. Visit his repositoryhereI forked from his though IDK why it doesnt say
Package: discordpy-replit-heroku-1-hi-1
Hosting your repl based discord.py bot on Heroku to keep it runningINDEFINETLYPrerequisitesYou must have an account forDiscord,GitHub,Heroku, andRepl.it(you probably have an account already).1. Create a bot and get its tokenCreate an application in the developer portalhereOpen up your new application and click 'Add Bot' under the Bot settings to create your bot.After creating the bot, click the 'Copy' button under the title Token. Take note of your token as you will need it later.2. Clone the GitHub repository and set it up to work with HerokuClone my Github repository into a replhere. This contains all the code you need to host your bot on Heroku. You can also view ithereLink your repl to a GitHub repositoryCreate an application for Herokuhere.Under 'Deploy', do the following:Deployment Method => Connect your GitHubApp connected to GitHub => Search for the forked repositoryAutomatic Deploy => Enable Automatic Deploy (to redeploy after every commit)Under 'Settings', click on 'Reveal Config Vars' and enter the following:KEY => DISCORD_TOKENVALUE => (Enter the bot token that you copied from the developer portal)Click the 'Add' button after entering all of this information.Under 'Resources', do the following:Click on the 'Pencil' icon.Switch the worker from off to on.Click 'Confirm' to finalize the decision.NOTE: You are given 550 free Dyno hours, which will not last the entire month. However, if you provide a credit card to verify your identity, you are given an additional 450 hours, which will allow your bot to run indefinitely. You will not be charged for this.What's next?Now you can tweak the main.py file as you please! just don't mess with the first 5 or last 2 lines (you can change the prefix in line 4 though.)Original code belongs to audieni. I just made it more suitable for repl.it bot creators. Visit his repositoryhere
Package: discord.py-self
A modern, easy to use, feature-rich, and async ready API wrapper for Discord’s user API written in Python.Note:Automating user accounts is against the Discord ToS. This library is a proof of concept and I cannot recommend using it. Do so at your own risk.Fork ChangesThese changes have become too numerous to mention, so check out ourdocs.Credits:Rapptzfor the original library this fork is based on. Without it, the project would not exist.arandomnewaccountfor help when the project was first started.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.Mostly compatible with the upstreamdiscord.py.Prevents user account automation detection.Implements vast amounts of the user account-specific API. For a non-exhaustive list:SessionsConnectionsRelationshipsProtobuf user settingsApplication/team managementStore/SKUs/entitlementsBilling (e.g. subscriptions, payments, boosts, promotions, etc.)Interactions (slash commands, buttons, etc.)InstallingPython 3.8 or higher is required.To install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord.py-self# Windowspy-3-mpipinstall-Udiscord.py-selfOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"discord.py-self[voice]"# Windowspy-3-mpipinstall-Udiscord.py-self[voice]To install the development version, do the following:$gitclonehttps://github.com/dolfies/discord.py-self$cddiscord.py-self$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)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)Using with UpstreamIf you would like to use the library alongside upstreamdiscord.py, you can installselfcord.pyinstead ofdiscord.py-self. Check out therenamed branchfor more information.Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# only 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='>',self_bot=True)@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationProject updatesDiscussion & support
Package: discord.py-self-embed
discord.py-self_embedA way for selfbots to send embeds again.It usesBenny's embed generator.Install$pipinstalldiscord.py-self-embedExampleimportdiscord_self_embedembed=discord_self_embed.Embed("discord.py-self_embed",description="A way for selfbots to send embeds again.",colour="ff0000",url="https://github.com/bentettmar/discord.py-self_embed")embed.set_author("Ben Tettmar")url=embed.generate_url(hide_url=True)# You can also convert the embed to a string.print(url)# The url will be put in your ctx.send() content.LimitationsBecause the embeds are web embeds there are limitations.No footers.Max 350 character description.
Package: discord.py-stubs
discord.py-stubsThis package contains type stubs to provide more precise static types and type inference for discord.py.Installationpip install discord.py-stubsNOTE:Becausediscord.pyuses namespace packages for its extensions,mypymust be configured to use namespace packages either with the--namespace-packagescommand line flag, or by settingnamespace_packages = Truein yourmypyconfiguration file. See theimport discoverysection of themypydocumentation for more details.Usage NotesIn most cases, installing this package will enable developers to type check their discord.py bots using mypy out of the box. However, if developers wish to subclass the classes indiscord.ext.commandsthey will need to follow themypydocumentation outlining how to useclasses that are generic in stubs but not at runtime:fromtypingimportTYPE_CHECKINGfromdiscord.extimportcommandsclassMyContext(commands.Context):...ifTYPE_CHECKING:Cog=commands.Cog[MyContext]else:Cog=commands.CogclassMyCog(Cog):...In order to avoid this issue, developers can usediscord-ext-typed-commands:fromdiscord.extimporttyped_commandsclassMyContext(typed_commands.Context):...classMyCog(typed_commands.Cog[MyContext]):...DevelopmentMake sure you havepoetryinstalled.poetry install
poetry run pre-commit install --hook-type pre-commit --hook-type post-checkoutVersion numbering schemeThemajorandminorversion numbers ofdiscord.py-stubswill match themajorandminorversion numbers of thediscord.pyrelease the stubs represent. For instance, if you are usingdiscord.pyversion1.7.4, you would usediscord.py-stubsversion1.7.XwhereXis the latestpatchversion of the stubs. Using semver dependency specifications,discord.py-stubsversion~1.7is designed to work withdiscord.pyversion~1.7.In addition,discord.py-stubswill indicate which versions of the runtime library are compatible through its dependency information (as suggested in PEP-561).