Saravanan666/pypi-org huggingface dataset:
Package: disnake
disnakeA modern, easy to use, feature-rich, and async-ready API wrapper for Discord written in Python.Key FeaturesProper rate limit handling.Type-safety measures.FastAPI-like slash command syntax.The syntax and structure ofdiscord.py 2.0is preserved.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-Udisnake# Windowspy-3-mpipinstall-UdisnakeInstallingdisnakewith full voice support requires you to replacedisnakehere, withdisnake[voice]. To learn more about voice support (or installing the development version), please visitthis section of our guide.(You can optionally installPyNaClfor voice support.)Note that voice support on Linux requires installation oflibffi-devandpython-devpackages, via your preferred package manager (e.g.apt,dnf, etc.) before running the following commands.VersioningThis project doesnotquite follow semantic versioning; for more details, seeversion guarantees.To be on the safe side and avoid unexpected breaking changes, pin the dependency to a minor version (e.g.disnake==a.b.*ordisnake~=a.b.c) or an exact version (e.g.disnake==a.b.c).Quick ExampleSlash Commands Exampleimportdisnakefromdisnake.extimportcommandsbot=commands.InteractionBot(test_guilds=[12345])@bot.slash_command()asyncdefping(inter):awaitinter.response.send_message("Pong!")bot.run("BOT_TOKEN")Context Menus Exampleimportdisnakefromdisnake.extimportcommandsbot=commands.InteractionBot(test_guilds=[12345])@bot.user_command()asyncdefavatar(inter,user):embed=disnake.Embed(title=str(user))embed.set_image(url=user.display_avatar.url)awaitinter.response.send_message(embed=embed)bot.run("BOT_TOKEN")Prefix Commands Exampleimportdisnakefromdisnake.extimportcommandsbot=commands.Bot(command_prefix=commands.when_mentioned)@bot.command()asyncdefping(ctx):awaitctx.send("Pong!")bot.run("BOT_TOKEN")You can find more examples in theexamples directory.Documentation⁕Guide⁕Discord Server⁕Discord Developers
Package: disnake-cog-loader
How to useThe first step is to let the extension know which class is the cog.
Suppose the cog subclass is defined asFooCog,classFooCog(commands.Cog):passYou should name the file,foo_cog.pyThe module will then convert snake_case to PascalCase and then try to import the cog to load it.
The module will try to pass the bot instance to it so be sure to accept it in the constructor,classFooCog(commands.Cog):def__init__(self,bot:commands.Bot):...disnake.ext.loader.Loaderaccepts two parameters,botandfolder_name.botThecommands.Botinstance to load cogs.folder_nameThe folder where the cogs are located. You may also enter something likeext.cogsif the cogs folder is inside a folder namedext.
Package: disnake-components
disnake-componentsAn unofficial third party library of disnake for discord components.Welcome!Discord components are cool, but discord.py will support it on version 2.0. It
is hard to recreate, so we made a third-party library for using components such as
buttons or selects!This project is open source ⭐.Also, there is anofficial discord server, so
if you have any questions, feel free to ask it on this server.FeaturesYou can use message components and handle component interactions easily!Third-party of disnake.DocsGitbook version(Up to
date)Wiki Version(Up to date)Install# GitHub (Develop)pipinstall--upgradegit+https://github.com/LOCUS-TEAM/disnake-components.git# Pypi (Current)pipinstall--upgradedisnake-componentsExampleYou can see many exampleshere.LicenseThis project is under the MIT License.Repos using DisnakeComponentsHow-to useEvery discord.py, discord, DiscordComponent, discord_components mention should be changed todisnake, disnake, disnakeComponent, disnake_component
Package: disnakedb
disnakedbInstallationpip3 install disnakedbUsageimportdisnakedbdb=disnakedb.Init()print(db.get("foo"))# Nonedb.set("foo","bar")print(db.get("foo"))# bardb.set("any",{"id":1234,"top":1,"str":"any string"})print(db.get("any"))# {"id": 1234, "top": 1, "str": "any string"}print(db.get("any")["id"])# 1234db.remove("foo")db.remove("any")print(db.get("foo"))# None
Package: disnake-debug
disnake-debuga debugging and utility extension for disnake botsdisnake-debug is an extension for bot developers that enables rapid prototyping, experimentation, and debugging of features for bots.
features include easy blacklisting, dynamically change bot avatar and name, pause and unpause the bot (stop it from responding to commands until unpaused), evaluate code (normal, return and dir), leave guilds, speak as the bot, view invokes and view bot statisticsOne of disnake-debug's core philosophies is to be dynamic and easy-to-use. Here's the two step install:Download disnake-debug on the command line using pip:pipinstall-Udisnake-debugLoad the extension in your bot code before it runs:bot.load_extension('disnake-debug')That's it!How to use debug:Once the extension is loaded and the bot is online you can just run the debug command
If your prefix is . you would run.debugHow to configure the database (sqlite) location:In your .env, putDATABASE_PATH=your_pathMake sure there is a database.db file in your_pathConfigure the embed colors:In your .env replaceEMBED_COLORwith a hex colorEMBED_COLORis automatically created and added to your.envSimple bot example with disnake-debug:fromdotenvimportload_dotenv# import load_dotenv to load your .env filefromosimportenviron# import environfromdisnakeimportIntents# import intentsfromdisnake.ext.commandsimportBot# import Bot classbot=Bot(command_prefix=".",# your command prefixowner_ids=[298043305927639041],# put your owner id in hereintents=Intents.all()# so you can see users (required for blacklist))bot.load_extension("disnake-debug")# load debug extension. one command and that is debug@bot.eventasyncdefon_ready()->None:print(f"Logged in as{bot.user}")if__name__=="__main__":load_dotenv()bot.run(environ["TOKEN"])Some pictures:
Package: disnake-docs
AboutThis extension's purpose is of adding a "docs" command, its purpose is to help documenting in chat.How To Load Itfromdisnake.extimportcommandsbot=commands.Bot(...)bot.load_extension('docs')bot.run(...)How To Add More ItemsTo add more items besidespythonanddisnake, you can subclassdoc.cog.DocsExample:fromdisnake.extimportcommandsfromdocsimportcogclassMyCog(cog.Docs):def__init__(self,bot):super().__init__(bot)# Now we set the new items# NOTE: It must be a list of tuples or a tuples of tuplesself.items=(('disnake','https://disnake.readthedocs.io/en/latest/'),('python','https://docs.python.org/3/'),('aiohttp','https://aiohttp.readthedocs.io/en/stable/'),)# NOTE: You must also add `disnake` and `python` manually, otherwise# it will only show the items you put.bot=commands.Bot(...)bot.add_cog(MyCog(bot))bot.run(...)Inspired Bypython-discord/bot/bot/exts/info/doc- The community bot for the Python Discord community
Package: disnake-ext-dashboard
Установкаpipinstall--upgradedisnake-ext-dashboardpython3-mpipinstall--upgradedisnake-ext-dashboardПрименениеПредпосылкиПрежде чем приступить к работе, вам понадобится несколько вещей:Вебхук в секретном канале (если у кого-то есть доступ, он сможет все получить лягушку а это плохо).Правильно размещенный ботdisnake.pyИ так поехали!(жабы топ)ПримерыБотimportdisnakefromdisnake.extimportcommandsfromdisnake.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,requestfromdisnake.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: disnake-ext-fluent
disnake-ext-fluentLocalizationProtocolimplementation for projects using Fluent.For usage example, seetheexamplefolder.This library supportslogging.Version GuaranteesThis project obeys theCargo SemVer.LicenseThis project is licensed under the GNU Lesser General Public License, version 3; seeLICENSEfor more.AcknowledgementsThis project has portions of other software incorporated into it; please readACKNOWLEDGEMENTS.mdfor more.
Package: disnake-ext-invitetracker
disnake-ext-invitetrackerAboutA module that allows you to track invitationsInstallationPython 3.8 or higher is requiredIt is necessary to first installDisnakeThen install the extension by running one of the following commands:# Linux/macOSpython3-mpipinstall-Udisnake-ext-invitetracker# Windowspy-3-mpipinstall-Udisnake-ext-invitetrackerLinksUsage ExamplesDisnake ServerLicenseCopyright (c) 2022 Lukef
Package: disnake-ext-ipc
disnake-ext-ipcAboutA disnake extension for inter-process communication.InstallationPython 3.8 or higher is requiredIt is necessary to first installDisnakeThen install the extension by running one of the following commands:# Linux/macOSpython3-mpipinstall-Udisnake-ext-ipc# Windowspy-3-mpipinstall-Udisnake-ext-ipcLinksUsage ExamplesSupport Discord ServerOriginal code NextcordLicenseCopyright (c) 2020 Ext-CreatorsCopyright (c) 2021 Nextcord DevelopersCopyright (c) 2022 Lukef
Package: disnake-pagination
Disnake PaginatorA simple Embed Paginator developed for projects made withdisnake, a fork ofdiscord.py.InstallationYou can usepipto install this library.pip install disnake-paginationUsageGuidefromPaginatorimportCreatePaginatorfromdisnakeimportEmbedembeds=[Embed(description="First Embed"),Embed(description="Second Embed"),Embed(description="Third Embed"),Embed(description="Fourth Embed")]timeout=120.0# Optionalauthor_id=ctx.author.id# Optional, If not specified, anyone can interact with pagination buttons.awaitctx.send(embed=embeds[0],view=CreatePaginator(embeds,author_id,timeout))ExampleYou may view implementation of this library inPointsBot.ContributingPull requests and issues are welcome.Consider giving this repository a ⭐, It is highly appreciated!LicenseThis repository has been made available viaMITLicense.
Package: disnake-paginator
disnake-paginatorA module containing paginators for disnakeInstallationpip install disnake-paginatorExamplesInteraction exampleasyncdefping_command(inter):paginator=disnake_paginator.ButtonPaginator(title="Pong",segments=["Hello","World"],color=0x00ff00)awaitpaginator.start(inter)on_messageexampleasyncdefon_message(message):ifmessage.content=="!ping":paginator=disnake_paginator.ButtonPaginator(title="Pong",segments=["This is","a message"],button_style=disnake.ButtonStyle.red)awaitpaginator.start(disnake_paginator.wrappers.MessageInteractionWrapper(message))#sends a message in the channelawaitpaginator.start(disnake_paginator.wrappers.UserInteractionWrapper(message.author))#sends a DM to the authorsplitfunctionasyncdefaaa_command(inter):paginator=disnake_paginator.ButtonPaginator(title="aaa",segments=disnake_paginator.split("a"*6969,1000),target_page=4)awaitpaginator.start(inter)Argumentstitle= The title of the embedsegments= The contents (pages) of the paginator (supportsstranddisnake.Embed)color= The color of all the embedsprefix= The prefix of every page in the embedsuffix= The suffix of every page in the embedtarget_page= The page that the paginator will display when senttimeout= The amount of seconds before the paginator stops workingbutton_style= The style of the buttons on the paginator (red, gray, green, etc)invalid_user_text= The function that will be called when another user tries to use the paginator(x)_button_emoji= The emoji displayed on the (x) button (for examplefirst_button_emoji)(x)_button_label= The label (text) displayed on the (x) button (for examplenext_button_label)If you would like to modify this repository (including its code) in your own project, please be sure to credit!
Package: disnake-pomice
PomiceThe modernLavalinkwrapper designed fordiscord.pyThis library is heavily based off of/uses code from the following libraries:WavelinkSlateGranitepyInstallTo install the library, you need the lastest version of pip and minimum Python 3.8Stable versionpip install pomiceUnstable version (this one gets more frequent changes)pip install git+https://github.com/cloudwithax/pomiceSupportThe official documentation ishereYou can join our support serverhereExamplesIn-depth examples are located in the examples folderHere's a quick example:importpomiceimportdiscordimportrefromdiscord.extimportcommandsURL_REG=re.compile(r'https?://(?:www\.)?.+')classMyBot(commands.Bot):def__init__(self)->None:super().__init__(command_prefix='!',activity=discord.Activity(type=discord.ActivityType.listening,name='to music!'))self.add_cog(Music(self))asyncdefon_ready(self)->None:print("I'm online!")awaitself.cogs["Music"].start_nodes()classMusic(commands.Cog):def__init__(self,bot)->None:self.bot=botself.pomice=pomice.NodePool()asyncdefstart_nodes(self):awaitself.pomice.create_node(bot=self.bot,host='127.0.0.1',port='3030',password='youshallnotpass',identifier='MAIN')print(f"Node is ready!")@commands.command(name='join',aliases=['connect'])asyncdefjoin(self,ctx:commands.Context,*,channel:discord.TextChannel=None)->None:ifnotchannel:channel=getattr(ctx.author.voice,'channel',None)ifnotchannel:raisecommands.CheckFailure('You must be in a voice channel to use this command''without specifying the channel argument.')awaitctx.author.voice.channel.connect(cls=pomice.Player)awaitctx.send(f'Joined the voice channel `{channel}`')@commands.command(name='play')asyncdefplay(self,ctx,*,search:str)->None:ifnotctx.voice_client:awaitctx.invoke(self.join)player=ctx.voice_clientresults=awaitplayer.get_tracks(query=f'{search}')ifnotresults:raisecommands.CommandError('No results were found for that search term.')ifisinstance(results,pomice.Playlist):awaitplayer.play(track=results.tracks[0])else:awaitplayer.play(track=results[0])bot=MyBot()bot.run("token here")FAQWhy is it saying "Cannot connect to host"?You need to have a Lavalink node setup before you can use this library. Download ithereWhat experience do I need?This library requires that you have some experience with Python, asynchronous programming and the discord.py library.Why is it saying "No module named pomice found"?You need toinstallthe package before you can use itContributorsThanks tovveepsfor implementing some features I wasn't able to do myself
Package: disnake-together
disnake-togetherTable of ContentsAboutExamplesprerequisitesContributingAboutA 3rd party library for Discord's BETA feature of VC Party GamesPrerequisitesYou should have disnake installed in order to use this packageTo install disnake, run the following code in a terminalpip install disnakeExamplesGenerate a link for YouTube Togetherfromdisnake.extimportcommandsfromdisnake_togetherimportDisnakeTogetherclient=commands.Bot(command_prefix="*")togetherControl=DisnakeTogether(client)@client.command()asyncdefyoutubeTogether(self,ctx):togetherControl=DiscordTogether(self.client)# To check if the user is in a vctry:vc=ctx.author.voice.channel.idexcept:awaitctx.channel.send("You are not in a VC, please join one and then use the command")# Get invite linklink=awaittogetherControl.create_link(vc,'youtube')awaitctx.send(f"Click the link 👇\n{link}")You can replaceyoutubewith the other interactions i.e betrayal, chess, fishing, pokerContributingLamerGamerYTBxllistic
Package: disno
disnoA modular API wrapper designed to handle the many aspects of theDiscord API.What is meant by modular is that you can resuse components for other parts of the library or your custom implementations.The library is currently in early development.Is this a fork of discord.py?This library does inspire greatly fromdiscord.pybut is essentially different and aims to implement features that discord.py didn't as well
as features it hasn't.
Package: disnowflake
# disnowflake
[![GitHub](https://img.shields.io/github/license/peco2282/disnowflake)](https://github.com/peco2282/disnowflake/blob/main/LICENSE)
[![Github](https://img.shields.io/pypi/v/disnowflake)](https://pypi.org/project/disnowflake/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/disnowflake)](https://github.com/peco2282/disnowflake/blob/main/main.py)> discord の Snowflake から [年, 月, 日, 時, 分, 秒, ミリ秒] を取得できます。# インストール方法pip install disnowflake
Package: disopy
DisopyA basic Discord bot for SubsonicInstallation$pipinstalldispoy
$disopy# First run to generate the default config fileDisopy supports Python 3.11 and newer.ConfigurationThe cofig file is located in$XDG_CONFIG_PATH/disopy/disopy.json, in most cases you'll see it as~/.config/disopy/disopy.json. The default config file looks like this:{"subsonic":{"subsonicUrl":"https://","username":"","password":""},"discordToken":"","caCertsPath":""}Fill it up with your data. The deploy of the bot in Discord won't be covered in this document as it's already explained in theDiscord Developer Portaland other sources. SeeCustom certsfor more info about self signed certificates.UsingAfter you have your Discord Application created and invited the bot to a server start it with:$disopyWait until it reports a successful connection to the Discord and Subsonic APIs, then enjoy the power of selfhosting usingslash commands(/command) in a text channel. All slash commands are self-explanatory by its descriptions.Custom CA CertsIf you want to use custom certs you can point a unencrypted PEM file in"caCertsPath"in theconfiguration.Tip:If you just want to use the certificates installed in your machine instead of the ones bundled in therequestspackage you can set it as"caCertsPath": "/etc/ssl/certs/ca-certificates.crt"and in most cases, it will work.QuirksTheSubsonic API search implementationdoesn't support playlists so the search for them is made with a plain substring search making it more difficult to find the desired playlist. If anyone makes a better implementation of it feel free to contribute to the project with it.AuthorCreated with :heart: byKutu.GitHub -kutu-devTwitter -@kutu_dev
Package: disortify
DISORTIFY PYTHON LIBRARYdisortify is a python library provides a functions for sorting, modifying and displaying data in various format.PURPOSEDisortify provides simple function in order to sort and modify data in python either you need to sort data in ascending or descending,capitalize or convert string items to upper and lowercase, dislay data in row,column and in different format. this library offers straightforward methods to enhance your data manipulation capabilities.FUNCTIONS AND USAGEasc() - to sort data in ascending order.desc() - to sort data in descending order.caps() - to capitalize data items.lows() - to set items into lowercase.ups() - to set items into uppercase.bylen() - to sort data according to its length.last() - to sort data according to the last value of an item.duple() - to avoid duplicate data.dictkey() - to sort dictionary keys in order.dictval() - to sort dicitonary values in order.desckey() - to sort dictionary keys in descending.descval() - to sort dictionary values in descending.keycaps() - to capitalize dictionary key.col() - to display data in column.row() - to display data in row.numbered() - to display data in number order.dict_format() - to display data in dictionary form.set_format() - to display data in set form.list_format() - to display data in ordered list.lett() - to display data items in letter.IMPORT LIBRARYfrom disortify.formats import * or (formats)INSTALLATIONYou can install the library using pip.
— pip install disortifyVERSIONSprimary release Jan 15 2024: v.0.1.0
Package: dispand
Message ExpanderexamplemessageattachmentembedSetting...$pipinstall-UexpanderUsage...importdiscordfromexpandimportmessage_expanderfromdiscord.extimportcommandsbot=commands.Bot(intents=discord.Intents.all())@bot.eventasyncdefon_message(message:discord.Message):#　statements...awaitmessage_expander(bot=bot,message=message)else if you use extention...importdiscordfromdiscord.ext.commandsimportBotINITIAL_EXTENTIONS=[...,"message_expander"]classMain(Bot):def__init__(self,**options):super().__init__(**options)asyncdefon_ready(self):forcoginINITIAL_EXTENTIONS:self.load_extension(cog)print(self.user.id)print(self.user.name)print("--------------")if__name__=='__main__':Main(command_prefix=...,intents=discord.Intents.all(),help_command=...).run("TOKEN")
Package: dispander
dispander (Discord Message URL Expander)DiscordのメッセージURLを検知して展開する機能を追加する discord.py Bot拡張用ライブラリ使い方python3 -m pip install dispanderextensionとして使用する場合load_extensionで読み込んでくださいfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='/')bot.load_extension('dispander')bot.run(token)関数として使用する場合on_message内のどこかで実行してくださいimportdiscordfromdispanderimportdispandclient=discord.Client()@client.eventasyncdefon_message(message):ifmessage.author.bot:returnawaitdispand(message)client.run(token)
Package: disparity-interpolation
Fast nearest-neighbor interpolation of disparity maps using CythonSome stereo matching methods such asSemi-Global Matching (SGM)might provide sparse disparity maps, meaning that some pixels will not have valid disparity values. In those cases, an interpolation of the predicted disparity map might be needed for evaluation against semi-dense ground-truth, as in theKITTI Stereo 2015 benchmark.Usage example:importdisparity_interpolationdefinterpolate_disparity(disparity_map:np.array)->np.array:"""Intepolate disparity image to inpaint holes.The expected run time for a stereo image with 2056 × 2464 pixels is ~50 ms."""# Set the invalid disparity values defined as "0" to -1.disparity_map[disparity_map==0]=-1disparity_map_interp=disparity_interpolation.disparity_interpolator(disparity_map)returndisparity_map_interp
Package: dis.patch
dis.patchAdiscord.pyutility library.WarningThis is a very early alpha version. There might be some unknown issues.Featurescustom Context with additional features likectx.askpatchedBotandAutoShardedBotclasses:use custom Contextautomatically loads token and prefix from.envfileautomatically loads cogs/extensions ifcogs_pathis passed (e.g.cogs_path="bot/cogs")monkey_patch()to overwritediscord.pyclasses withdispatchInstallationpip install dis.patchUsage.envTOKEN=token
PREFIX=?bot.pyimportdispatchfromdiscord.extimportcommandsdispatch.monkey_patch()bot:dispatch.Bot=commands.Bot(cogs_path="bot/cogs")@bot.command()asyncdeftest(ctx:dispatch.Context):answer=awaitctx.ask("Do you like dispatch?")print(answer)bot.run()RequirementsPython >= 3.6pydanticpython-dotenvdiscord.pyContributing and IssuesIf you want to contribute or want to suggest additional features please usegithub issues.