Facing issue in django-channels

I am facing an error in django-channels, where it says:

Not Found: /ws/jokes/

here is my
consumers.py:

from channels.generic.websocket import AsyncWebsocketConsumer


class JokesConsumer(AsyncWebsocketConsumer):
    async def connect(self):
        await self.channel_layer.group_add('jokes', self.channel_name)
        await self.accept()

    async def disconnect(self):
        await self.channel_layer.group_discard('jokes', self.channel_name)

    async def send_jokes(self, event):
        text_message = event['text']

        await self.send(text_message)

here is the:
routing.py:

from django.urls import path
from .consumers import JokesConsumer


ws_urlpatterns = [
    path('ws/jokes/', JokesConsumer.as_asgi())
]

and here is the
asgi.py:

import os

from django.core.asgi import get_asgi_application
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter

from jokes.routing import ws_urlpatterns


os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'jokes_project.settings')

application = ProtocolTypeRouter({
    'http': get_asgi_application(),
    'websocket': AuthMiddlewareStack(URLRouter(ws_urlpatterns)),
})

I have added the CHANNEL_LAYERS in the settings.py, also I have set ASGI_APPLICATION, and celery_broker_url.

Side note: When posting code (or templates, error messages, tracebacks, etc), enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted. (I’ve taken the liberty of editing your original post. Please remember to do this in the future.)

Okay thank you acknowleged.

Your asgi.py file is incorrect.

I suggest you follow the pattern as shown in the Django Channels tutorial in the section Write your first consumer precisely as shown in the sample file. Do not rearrange the code or otherwise modify the sequence of events as shown by that sample.