(time_string)
| 80 | await b.send_message(Config.LOG_CHANNEL, log_message) |
| 81 | |
| 82 | async def get_seconds_first(time_string): |
| 83 | conversion_factors = { |
| 84 | 's': 1, |
| 85 | 'min': 60, |
| 86 | 'hour': 3600, |
| 87 | 'day': 86400, |
| 88 | 'month': 86400 * 30, |
| 89 | 'year': 86400 * 365 |
| 90 | } |
| 91 | |
| 92 | parts = time_string.split() |
| 93 | total_seconds = 0 |
| 94 | |
| 95 | for i in range(0, len(parts), 2): |
| 96 | value = int(parts[i]) |
| 97 | unit = parts[i+1].rstrip('s') # Remove 's' from unit |
| 98 | total_seconds += value * conversion_factors.get(unit, 0) |
| 99 | |
| 100 | return total_seconds |
| 101 | |
| 102 | async def get_seconds(time_string): |
| 103 | conversion_factors = { |
nothing calls this directly
no outgoing calls
no test coverage detected