tech-dex / gogig Goto Github PK
View Code? Open in Web Editor NEWA Discord bot that is using AsyncPRAW, a Reddit API to find jobs on subreddits and post them to your Discord channel.
License: MIT License
A Discord bot that is using AsyncPRAW, a Reddit API to find jobs on subreddits and post them to your Discord channel.
License: MIT License
Defining a local variable or function with the same name as a built-in object makes the built-in object unusable within the current scope and makes the code prone to bugs.
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PYL-W0622/occurrences/
Words like:
"Front end" , "Dev" are not recognized right now.
It is recommended not to use global
statement unless it is really necessary. Global variables are dangerous because they can be simultaneously accessed from multiple sections of a program. This frequently results in bugs. This also make code difficult to read, because they force you to search through multiple functions …
There are 3 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PYL-W0603/occurrences/
Nested if
statements can be collapsed into a single if
statement by separating their condition using and
operator. Merging collapsible if
statements increases the code's readability. ### Not preferred: python if condition1: if condition2: dosomething()
### Preferred: python if condition1 and condition2: dosomething()
### Exception: DeepSource would not …
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PTC-W0048/occurrences/
Use this snippet of code as a start
illegal_char_list = ['.', ',']
for word in text.split(' '):
for illegal_char in illegal_char_list:
word = word.replace(illegal_char, '')
print(word)
Sometimes instead of "Hiring" is "Hiring - Open". Those are not processed by the bot.
Got this error and broke the bot.
Unhandled exception in internal background task 'search_subreddits'.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/discord/ext/tasks/__init__.py", line 101, in _loop
await self.coro(*args, **kwargs)
File "/bot-code/main.py", line 79, in search_subreddits
async for submission in subreddit.new(limit=10):
File "/usr/local/lib/python3.9/site-packages/asyncpraw/models/listing/generator.py", line 62, in __anext__
await self._next_batch()
File "/usr/local/lib/python3.9/site-packages/asyncpraw/models/listing/generator.py", line 72, in _next_batch
self._listing = await self._reddit.get(self.url, params=self.params)
File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 504, in get
return await self._objectify_request(method="GET", params=params, path=path)
File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 585, in _objectify_request
await self.request(
File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 787, in request
return await self._core.request(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 363, in request
return await self._request_with_retries(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 282, in _request_with_retries
return await self._do_retry(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 202, in _do_retry
return await self._request_with_retries(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 282, in _request_with_retries
return await self._do_retry(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 202, in _do_retry
return await self._request_with_retries(
File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 300, in _request_with_retries
Try-catch this 503 Service Unavailable that breaks the bot
It is wasteful to use f-string
mechanism if there are no expressions to be extrapolated. It is recommended to use regular strings instead.
There are 17 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PTC-W0027/occurrences/
Also be sure you'll link database server with python server in Dockerfile
Restrict inital use of commands for administrator.
Then create another command to let admin declare a role than can use the commands. Sth like "GoGig admin" role
https://stackoverflow.com/questions/51240878/discord-bot-check-if-user-is-admin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.