Skip to content

Commit

Permalink
v0.2 11/10/2021
Browse files Browse the repository at this point in the history
Co-authored-by: New-dev0 <New-dev0@users.noreply.github.com>
Co-authored-by: Amit Sharma <buddhhu@users.noreply.github.com>
Co-authored-by: TechiError <techierror@users.noreply.github.com>
Co-authored-by: Aditya <me@xditya.me>
Co-authored-by: Sonya Nikiforova <Sonniki@users.noreply.github.com>
Co-authored-by: M̲αραт <Marty2509@users.noreply.github.com>
Co-authored-by: Muhamad Risman Aziz <mrismanaziz@users.noreply.github.com>
Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com>
Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com>
Co-authored-by: sppidy <sppidy@users.noreply.github.com>
  • Loading branch information
11 people committed Oct 10, 2021
1 parent 8f28387 commit 6f44b38
Show file tree
Hide file tree
Showing 165 changed files with 5,535 additions and 4,153 deletions.
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
teamultroid@ultroid.tech.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Welcome To Contributing Guide
Any contribution done to this repository will be appreciated! 🎉

### Issues
- Search for existing Similar issues.
- You can open a issue first before contributing, If it contain some major changes like `bug fixes` or `feature addition`.
- If you are busy or getting trouble while making changes, you can just open the issue (explaining it).

### Contributing
- You can [fork](https://github.com/TeamUltroid/Ultroid/fork) this repository.
- You can commits your changes now.
- You can [Git-Squash](https://docs.github.com/en/get-started/using-git/about-git-rebase) your commits, if they are more. [Optional]
- At last, You are ready to [`make a Pull Request`](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
- Make sure that, your `Pull Request` contain an explaining title and issue number if it closes any open issue.

### Thanks
- Congrats! 💫 you have successfully made your Contribution to Ultroid.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ FROM theteamultroid/ultroid:main

# set timezone
ENV TZ=Asia/Kolkata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# clone the repo and change workdir
RUN git clone https://github.com/TeamUltroid/Ultroid.git /root/TeamUltroid/
WORKDIR /root/TeamUltroid/
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \

# cloning the repo and installing requirements.
&& git clone https://github.com/TeamUltroid/Ultroid.git /root/TeamUltroid/ \
&& pip3 install --no-cache-dir -r root/TeamUltroid/requirements.txt \
&& pip3 uninstall av -y && pip3 install av --no-binary av

# install main requirements.
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 uninstall av -y && pip3 install av --no-binary av
# changing workdir
WORKDIR /root/TeamUltroid/

# start the bot
CMD ["bash", "resources/startup/startup.sh"]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
## Deploy to Heroku
Get the [Necessary Variables](#Necessary-Variables) and then click the button below!

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FNew-dev0%2FTraveliTg&template=https%3A%2F%2Fgithub.com%2FNew-dev0%2FTraveliTg)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?button-url=https%3A%2F%2Fgithub.com%2FNew-dev0%2FArchived&template=https%3A%2F%2Fgithub.com%2FNew-dev0%2FArchived)

## Deploy Locally
- [Traditional Method](#local-deploy---traditional-method)
Expand Down Expand Up @@ -68,6 +68,7 @@ Further, take a look at the [`docs`](https://blue-devil1134.github.io/UltroidCli
`virtualenv -p /usr/bin/python3 venv`
`. ./venv/bin/activate`
- Install the requirements: <br />
`pip(3) install -U -r re*/st*/optional-requirements.txt`
`pip(3) install -U -r requirements.txt`
- Generate your `SESSION`:
- For Linux users:
Expand All @@ -89,7 +90,7 @@ Further, take a look at the [`docs`](https://blue-devil1134.github.io/UltroidCli
## Necessary Variables
- `SESSION` - SessionString for your accounts login session. Get it from [here](#Session-String)
- `REDIS_URI` - Redis endpoint URL, from [redislabs](http://redislabs.com/), tutorial [here.](./resources/extras/redistut.md)
- `REDIS_PASSWORD ` - Redis endpoint Password, from [redislabs](http://redislabs.com/), tutorial [here.](./resources/extras/redistut.md)
- `REDIS_PASSWORD` - Redis endpoint Password, from [redislabs](http://redislabs.com/), tutorial [here.](./resources/extras/redistut.md)

## Session String
Different ways to get your `SESSION`:
Expand Down
10 changes: 7 additions & 3 deletions assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.

from pyUltroid import *
from pyUltroid.dB.database import Var
from pyUltroid.functions.all import *
from pyUltroid.functions.helper import *
from pyUltroid.misc import owner_and_sudos
from pyUltroid.misc._assistant import asst_cmd, callback, in_pattern
from telethon import Button, custom

from strings import get_languages, get_string
from plugins import ATRA_COL
from strings import get_languages, get_string, language

OWNER_NAME = ultroid_bot.me.first_name
OWNER_ID = ultroid_bot.me.id

AST_PLUGINS = {}


async def setit(event, name, value):
try:
Expand Down
22 changes: 10 additions & 12 deletions assistant/api_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.

from telethon import events

from . import *

# main menu for api setting


@callback("apiset")
@owner
async def apiset(event):
@callback("apiset", owner=True)
async def apiset(event: events.CallbackQuery):
await event.edit(
get_string("ast_1"),
buttons=[
Expand All @@ -24,9 +25,8 @@ async def apiset(event):
)


@callback("rmbg")
@owner
async def rmbgapi(event):
@callback("rmbg", owner=True)
async def rmbgapi(event: events.CallbackQuery):
await event.delete()
pru = event.sender_id
var = "RMBG_API"
Expand All @@ -48,9 +48,8 @@ async def rmbgapi(event):
)


@callback("dapi")
@owner
async def rmbgapi(event):
@callback("dapi", owner=True)
async def rmbgapi(event: events.CallbackQuery):
await event.delete()
pru = event.sender_id
var = "DEEP_API"
Expand All @@ -72,9 +71,8 @@ async def rmbgapi(event):
)


@callback("oapi")
@owner
async def rmbgapi(event):
@callback("oapi", owner=True)
async def rmbgapi(event: events.CallbackQuery):
await event.delete()
pru = event.sender_id
var = "OCR_API"
Expand Down
Loading

0 comments on commit 6f44b38

Please sign in to comment.